Re: Temporarily suppress all error messages
Leo Butler <[email protected]> Tue, 19 May 2026 15:20:43 +0000
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <[email protected]> |
If you are using a recent version of maxima, you can do the following at the terminal: :lisp(setf *error-output* (make-output-string-stream)) Alternatively, you can save the line (setf *error-output* (make-output-string-stream)) in a start-up file (e.g. maxima-init.lisp) and make sure it gets loaded at start-up. Explanation: in recent versions of Maxima, errors and warnings are printed to the output stream *ERROR-OUTPUT*. That can be rebound to a "string stream", which results in the diversion of the error messages to a sink. Best regards, Leo On Tue, May 19 2026, Michel Talon <[email protected]> wrote: > Le 19/05/2026 à 04:52, Astrea Drifter a écrit : >> >> While searching for solutions, I found a thread where the following >> commands were recommended to turn off error and warning messages >> respectively, and these seemed well suited for the use case of that >> thread's op: >> :lisp (defun merror(&rest foo) nil) >> :lisp (defun mtell (&rest foo) nil) >> >> Unfortunately, while I have some experience with Maxima, I know >> nothing at all about Lisp. > > A little pedagogy: a lot of errors in maxima trigger the function > merror, which outputs the appropriate error message. In lisp you can > redefine any function, so when doing (defun merror(&rest foo) nil) > you are just redefining merror to produce nil, for whatever arguments > you feed merror with (&rest foo). Idem for mtell which is triggered by > less severe problems. But this does not work for your use case because > the error is produced at the level of the parser (nparse.lisp) in > which errors do not call merror or mtell, but just use the lisp > function format to output a message. > > (format t (intl:gettext "incorrect syntax: ")) line 122 of nparse.lisp > > followed by some more complex stuff to output the cause of the error, > here ~ is not an infix operator ... > > Since you probably don't want to redefine lisp functions, i don't see > how to mute this error message. -- --- Best regards, Dr Butler _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss