emacsfocusaquamacs

Aquamacs/emacs: focus-follows-mouse not working as expected


I'm working with Aquamacs 2.3a [latest version] on Mac OS X 10.6.8. I would like to switch between frames/buffers by just moving the mouse. As far as I found out by searching for this problem, you can put the following code in Preferences.el to make it work:

(setq focus-follows-mouse t) (setq mouse-autoselect-window t)

See also here: Emacs sloppy focus no longer working - 2 second delay on changing focus and here: how to get focus-follows-mouse over buffers in emacs? I also found (setq mouse-autoselect-window t).

The problem is that none of these entries in Preferences.el seems to have any impact on the behavior of Aquamacs. I can move the cursor over new buffers or frames, nothing is activated. So my questions are:

1) what is the expected behavior of theses settings?

2) if they (as I would guess) should have an impact on the way Aquamacs allows to change buffers/frames, why is it not working in my case? [I even tried with an empty Preferences.el, just putting in the above commands].


Solution

  • I think you've been bit by a typical confusion over what focus-follows-mouse does. It does not make the focus follow the mouse. Rather, it just tells Emacs that your OS/window manager does have a focus-follows-the-mouse behavior. AFAIK, there is no way for Emacs to make the focus follow the mouse -- that's an OS/window-mgr thing.