6

I wonder how could I disable this annoying square which seems like it's zooming in the text under the emacs' cursor.

How can I get rid of it? And what is this exactly?

I am on emacs 24.5 (homebrew installed) and MacOS X El Capitán.

enter image description here

PabloRdrRbl
  • 435
  • 1
  • 4
  • 7
  • This issue is most definitely caused by something in your init file. The standard recommendation is to [bisect it](http://emacs.stackexchange.com/a/13997/2355). (You are unlikely to get a more helpful answer unless you provide more information about your setup.) You can try [The Bug Hunter by @Malabarba](http://endlessparentheses.com/debug-your-emacs-init-file-with-the-bug-hunter.html), though. – Constantine Feb 06 '16 at 01:16
  • 1
    Well, I was wrong (wouldn't be the first time). Sorry about that. Looks like [this](http://stuff-things.net/2015/10/05/emacs-visible-bell-work-around-on-os-x-el-capitan/) is the same issue. – Constantine Feb 06 '16 at 02:24

2 Answers2

8

I think the cause of the problem is visible-bell. Just put the following to your .emacs file:

(setq ring-bell-function 'ignore)

to get rid of both audible and visible bell

4

As noted in scaevola's answer, the problem is visible-bell. Completely turning off both audible and visible bell may seem a bit drastic, though. Here's a homebrew version of visible bell that just flashes the mode-line – but excluding some cases where the user deliberately caused the condition triggering the bell:

(setq ring-bell-function
  (lambda ()
    (unless (memq this-command
          '(isearch-abort abort-recursive-edit
                  exit-minibuffer keyboard-quit))
      (invert-face 'mode-line)
      (run-with-timer 0.1 nil 'invert-face 'mode-line))))

Adjust the delay 0.1 (seconds) to taste.

Harald Hanche-Olsen
  • 2,401
  • 12
  • 15