I got someone ask this question:
How can I prevent errors that should really just be a bell or flashing screen not open a window with an error?
I got someone ask this question:
How can I prevent errors that should really just be a bell or flashing screen not open a window with an error?
Not exactly sure what the context is or what you mean.
If by "open a window with an error" and "opening error buffer" you mean opening the debugger in buffer *Backtrace*
, then set variable debug-on-error
to nil
to prevent that. The error message will then simply be shown in the echo area.
Variable visible-bell
controls whether a bell (ding) sound is heard or the frame is flashed ("visible bell").
debug-on-error
should be nil by default. But I don't know in what context it pops up for him. semantic-mode
still pops backtrace, even if debug-on-error
is nil; maybe this is the case, or some other packages do this. visible-bell
seems only to flash frame, but ring-bell-function
controls how to ring the bell.
visible-bell
controls whether function ding
rings the bell or flashes the frame.
debug-on-error
is nil
by default, of course. But it being non-nil
is likely what is invoking the debugger on an error. And it is of course possible to invoke the debugger (*Backtrace*
) explicitly, either related to an error or not. As far as I know, you cannot prevent code from opening the debugger. You can, however, prevent it from automatically opening on an error that is not handled, using nil
debug-on-error
.
nil
debug-on-error
is typically a good way to find out what the error is and where it is being called. ;-)