Aquamacs/emacs:焦点跟随鼠标未按预期工作
我正在 Mac OS X 10.6.8 上使用 Aquamacs 2.3a [最新版本]。我想通过移动鼠标在帧/缓冲区之间切换。据我通过搜索这个问题发现,您可以将以下代码放入 Preferences.el 中以使其工作:
(setq focus-follows-mouse t) (setq mouse-autoselect-window t)
另请参见此处:Emacs 草率焦点不再起作用 - 更改焦点延迟 2 秒 在这里:如何获得焦点跟随鼠标emacs 中的缓冲区? 我还发现了(setq mouse-autoselect-window t)。
问题是 Preferences.el 中的这些条目似乎都对 Aquamacs 的行为没有任何影响。我可以将光标移动到新的缓冲区或帧上,但没有任何内容被激活。所以我的问题是:
1)这些设置的预期行为是什么?
2)如果它们(正如我猜测的那样)应该对 Aquamacs 允许更改缓冲区/帧的方式产生影响,为什么它在我的情况下不起作用? [我什至尝试使用空的 Preferences.el,只需输入上述命令]。
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].
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您对
focus-follows-mouse
的作用感到困惑。它不会使焦点跟随鼠标。相反,它只是告诉 Emacs 您的操作系统/窗口管理器确实具有焦点跟随鼠标的行为。 AFAIK,Emacs 没有办法让焦点跟随鼠标——这是操作系统/窗口管理器的事情。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.假设 https://www.emacswiki.org/emacs/follow-mouse.el 已安装并正常工作。
Try
M-x turn-on-follow-mouse
or(turn-on-follow-mouse)
assuming that https://www.emacswiki.org/emacs/follow-mouse.el is installed and correctly working.