我是一个新的 emacs 用户,将 emacs 用于令人敬畏的 org-mode。我的页面顶部有指向我所有 org 文件的链接,但是每次我单击一个链接时,它都会拆分我的窗口,所以我只有一半的屏幕空间可用。如何设置它以便 emacs 不会水平拆分窗口,而是为我的链接打开一个新窗口?
2 回答
I'm assuming you mean you want to open the link in a new frame. (Emacs terminology is a bit different from other GUI apps, because Emacs predates X11. What would be called a "window" in other apps is called a "frame" in Emacs, because "window" already had a specific meaning in Emacs, and was used in the names of lots of functions.) What's happening now is that you have a frame containing one window, and Emacs is splitting that window to form two windows.
You need to customize org-link-frame-setup
to use find-file-other-frame
instead of the default find-file-other-window
.
You can do this by typing M-x customize-variable <ENTER> org-link-frame-setup <ENTER>
. Click the Value Menu
next to find-file-other-window
and select find-file-other-frame
, then click Save for future sessions
.
一种选择是告诉 Emacs 永远不要拆分窗口,可以这样做:
(setq same-window-regexps '("."))
这将防止您的窗口分裂,然后您使用常规命令切换缓冲区以返回您正在查看的内容。
这与您所要求的相反,即 new frames,如果您的屏幕空间有限,IMO 并没有真正的帮助,因为您现在必须切换帧(图形窗口)。