Subject: Re: bug#1305: All code that currently beeps should use visual bell instead

From: Dmitry Gutov <[email-masked]>
Date: Sat, 17 Apr 2021 19:59:13 +0300

On 17.04.2021 15:55, Lars Ingebrigtsen wrote:
> Eli Zaretskii <[email-masked]> writes:
> 
>>> 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?

Same here. It's either GTK3 build, or its HiDPI support (if you also 
have a HiDPI screen).

>>> 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.

 From what I see, visible-bell does nothing in 'emacs -nw'.

Not sure how easy that would be to fix.

> 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.

Well, we probably do want it to have some effect in general, unless the 
user has customized is off in some way or another.