Emacs Visible Bell Work-Around on OS X El Capitan

less than 1 minute read

After I upgraded to OS X El Capitan‎, I started having random display issues with my build from source version of Emacs. After a while I realized that it was caused by the visual bell. I hate terminals/widows beeping at me, so I always set:

(setq visible-bell t)

in my .emacs. However, under El Capitan this smears (for lack of a better word) the center of the window with bits of zoomed in text. Not having the OS X UI chops to debug this, I went with this work around:

(setq visible-bell nil) ;; The default
(setq ring-bell-function 'ignore)

Setting visible-bell to nil re-enables the audio beep. However, if ring-bell-function is non-nil, it’s called to ring the bell instead of using the build in function. We need a no-op and the ignore function is just that. Goodbye pesky bell!

I’ll keep an eye on the Emacs source commits and see if visible-bell fix more gracefully.

Tags:

Updated:

Comments