Those sounds all the way drive me crazy, but it is uncomfortable to switch off system sounds at all because I need them in other places same time. I didn't find any settings where I could manage the sounds.
Turn off the bell, use the visual bell instead, or replace bell-ringing by some other visual indication.
You can set
ring-bell-function to a function such as
ignore, to just turn off all indication.
Or you can customize option
visible-bell, to use a frame flash instead of a sound.
Or you can use minor mode
echo-bell-mode from library
echo-bell.el to get just a brief visual indication in the echo area.
See also the Elisp manual, node Beeping.
3but where to do it? I do not see any hint nor here neither by the link, I'm missing some base knowledge everybody knows Nov 26, 2016 at 15:06
I try to follow the instructions in @find file@, but I have no HOME enviroment vaiable (what makes sence, I have never set up HOME), and I also can't find init file by it's name by total commande's "find". Could it have a name like "ediff-init.el" or "viper-init.el"? Nov 26, 2016 at 15:39
10@AnnaLeonenko just put the following lines in your
(setq visible-bell t)and
(setq ring-bell-function 'ignore). You will also need to restart your emacs or eval the file.– rphNov 5, 2018 at 2:29
1I usually set things up with customize. I.e. you do 'M-x describe-variable ENTER ring-bell-function` then you can go to a menu where you can select silent. Dec 9, 2019 at 17:36
If you compile Emacs yourself, and you don't want it to be capable of producing sound in general, then you can use:
Instead of turning off sound, you can use a visible-bell,
this function temporarily inverts the mode-line/header-line
(defun my-mode-line-visual-bell () (setq visible-bell nil) (setq ring-bell-function 'my-mode-line-visual-bell--flash)) (defun my-mode-line-visual-bell--flash () (let ((frame (selected-frame))) (run-with-timer 0.1 nil #'(lambda (frame) (let ((inhibit-quit) (inhibit-redisplay t)) (invert-face 'header-line frame) (invert-face 'header-line-highlight frame) (invert-face 'mode-line frame) (invert-face 'mode-line-inactive frame))) frame) (let ((inhibit-quit) (inhibit-redisplay t)) (invert-face 'header-line frame) (invert-face 'header-line-highlight frame) (invert-face 'mode-line frame) (invert-face 'mode-line-inactive frame))))
(setq ring-bell-function 'ignore)