Subject: RE: [External] : bug#1305: All code that currently beeps should use visual bell instead

From: Drew Adams <[email-masked]>
Date: Sat, 17 Apr 2021 13:16:25 +0000

> >> IMO, the default behavior on GNU/Linux (inverting video on the first and
> >> last line of the frame) is horrible (but perhaps less so than an actual
> >> bell),
> 
> Hm...  when I try this on Debian/bullseye, it inverts the video on the
> two first lines in the frame.  But I seem to recall it working the way
> you describe, so perhaps there's differences between various
> toolkits/libraries used by Emacs in this area?
> 
> >> and the default behavior on macOS is too intrusive (but again
> >> perhaps less so than an actual bell).
> >
> > On MS-Windows, we use a system API that flashes the caption bar of the
> > selected-frame's window.
> 
> Then it sounds like visible-bell should be visible enough on all the
> three major systems we support.
> 
> However, I just noticed that an "emacs -Q" doesn't beep at all on this
> machine -- because I've switched off all "alert" beeps in the OS
> interface.  So `C-g' just says "Quit" in the echo area, and nothing
> else.
> 
> So in this instance, defaulting `visible-bell' to "on" would make `C-g'
> more intrusive/obnoxious than previously...  which is the opposite
> effect than what was originally discussed in this bug report.

Just as plain `ding' can be annoying for some
users, so can this or that kind of visible
indication.

It would be good if, at least on some systems
and preferably on all, some degree of user
customization were available.  (Yes, I know that
`visible-bell' already offers some customization.)

One possibility of a customization choice could
be a notification in the mode-line - just one
example.

For one way to do that, see the tiny library
`echo-bell.el' (initial code from Miles Bader).
It offers a minor mode, and options to define
the kind of mode-line indication.

https://www.emacswiki.org/emacs/download/echo-bell.el