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

From: Dmitry Gutov <[email-masked]>
Date: Sun, 18 Apr 2021 18:26:10 +0300

On 18.04.2021 15:36, Lars Ingebrigtsen wrote:
> So you could say that there's some precedence for using
> just the echo area as the only notification mechanism (beyond apparently
> all the popular Emacs distributions doing exactly that).

Not really all of them. Here's what the distributions do:

Prelude and Spacemacs:

   (setq ring-bell-function 'ignore)

better-defaults:

   (setq visible-bell t)

Doom:

   (setq ring-bell-function #'doom-themes-visual-bell-fn
         visible-bell t)

   (defface doom-visual-bell '((t (:inherit error)))
     "Face to use for the mode-line when `doom-themes-visual-bell-config'
   is used."
     :group 'doom-themes)

   ;;;###autoload
   (defun doom-themes-visual-bell-fn ()
     "Blink the mode-line red briefly. Set `ring-bell-function' to this
   to use it."
     (let ((doom-themes--bell-cookie (face-remap-add-relative 'mode-line 
'doom-visual-bell)))
       (force-mode-line-update)
       (run-with-timer 0.15 nil
                       (lambda (cookie buf)
                         (with-current-buffer buf
                           (face-remap-remove-relative cookie)
                           (force-mode-line-update)))
                       doom-themes--bell-cookie
                       (current-buffer))))