[OS X Emacs] no focus in minibuffer on incremental search

Peter Frings peter.frings at agfa.com
Wed Apr 13 04:09:20 EDT 2011

Good morning all,

my trusty old Carbon Emacs has developed a frustrating habit: when I use C-s, the minibuffer prompts for a search string, but it is not focussed. Obviously, typing in a string doesn’t do anything. I have no clue which buffer has the focus at that time. 

When I press C-g, the search is cancelled as usual. When I press Return, the I-search prompt turns into a Search prompt, and the minibuffer regains focus.

AFAIK, I have not changed anything in the .emacs file, not customized anything. The version of emacs is the same, and the OS as well. This behavior also survives a restart of emacs. Even emacs -q doesn’t solve it.

I’ve tried this snippet to regain focus on the minibuffer:

(defun minibuffer-refocus ()
  "Refocus the minibuffer if it is waiting for input."
  (when (active-minibuffer-window)
    (message "") ;; clear the echo area, in case it overwrote the minibuffer
    (select-window (minibuffer-window))))

(global-set-key (kbd "C-M-g") 'minibuffer-refocus)

But to no avail. It works like a charm in other cases, but not for the incremental search...

Is there anyone that has any idea what’s going on, or has tips to hunt it down? This is really annoying...

** Details:
GNU Emacs 22.3.1 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of 2008-11-01 on leopard.local
OSX 10.6.7
C-s runs the command isearch-forward

c++;         // this makes c bigger but returns the old value

More information about the MacOSX-Emacs mailing list