Emacs 可怕的行为
我已经使用 emacs 多年,并且习惯于让 emacs 在执行 dired 的同一窗口中打开选定的文件。在最近的修订中,当在打开 2 个窗口的情况下执行 dired 时,选定的文件将显示在备用窗口中从迪雷德。如何设置 emacs 使用相同的窗口来显示已死亡的文件(允许我同时查看两个文件 - emacs 过去的工作方式)?
I have used emacs for years and am accustomed to having emacs open a selected file in the same window that dired is executed in. In recent revisions, when dired is executed with say 2 windows open, the file selected will be displayed in the alternate window from dired. How can I set up emacs to use the same window to display the file as died (allowing me to look at two files simultaneously--the way emacs used to work)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据上面的评论,在 dired 中检查 ChkRET 来查看 RET 绑定到什么(或者如果您使用另一个密钥,则类似)。
dired-find-file
使用switch-to-buffer
这可能会导致缓冲区在另一个窗口中打开:不过,这似乎不太可能成为问题。
编辑:啊,你正在使用鼠标。在有关 Emacs 的问题中明确说明这一点通常是件好事,因为大多数 Emacs 用户很少接触鼠标。
然而,同样的答案也适用:从 dired 中,输入 Chk ,然后输入您正在使用的“键”绑定(在本例中单击鼠标按钮 1),它告诉我们:
由于某种原因,没有默认的
dired-mouse-find-file
函数,但以下代码会伪造它:As per the comments above, check C-hkRET when in dired to see what RET is bound to (or similarly if you are using another key).
dired-find-file
usesswitch-to-buffer
which could cause the buffer to open in another window:That seems less likely to be the issue, though.
edit: Ah, you're using the mouse. It's often good to explicitly say that in questions about Emacs, because most Emacs users rarely touch the mouse.
The same answer applies, however: From dired, type C-hk and then the 'key'-binding you are using (in this case clicking mouse button 1), which tells us:
There's no default
dired-mouse-find-file
function for some reason, but the following will fake it:在 dired 中的文件上按 Enter 键会在同一窗口中打开该文件。在 dired 中的文件上按
o
将在其他窗口中打开它。您确定没有在 .emacs 中重新绑定这些键吗?Pressing Enter key on a file in dired opens the file in the same window. Pressing
o
on a file in dired opens it in other-window. Are you sure you are not rebinding these keys in your .emacs?