简体   繁体   English

如何保持Emacs组织模式不分裂窗口?

[英]How do I keep Emacs org-mode from splitting windows?

I'm a new emacs user using emacs for the awesome org-mode. 我是一个新的emacs用户,使用emacs来实现令人敬畏的组织模式。 I have links to all my org files at the top of my pages but everytime I click a link it splits my window, so I only have half of the screen estate available. 我有链接到我页面顶部的所有组织文件,但每次我点击一个链接它会分割我的窗口,所以我只有一半的屏幕空间可用。 How do I set it so that emacs does not split the window horizontally but rather opens up a new window for my links? 如何设置它以便emacs不会水平拆分窗口,而是为我的链接打开一个新窗口?

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. (Emacs术语与其他GUI应用程序略有不同,因为Emacs早于X11。其他应用程序中所谓的“窗口”在Emacs中称为“框架”,因为“窗口”在Emacs中已经具有特定含义,并且在许多函数的名称中使用了。)现在发生的是你有一个包含一个窗口的框架,而Emacs正在拆分该窗口以形成两个窗口。

You need to customize org-link-frame-setup to use find-file-other-frame instead of the default find-file-other-window . 您需要自定义org-link-frame-setup以使用find-file-other-frame而不是默认的find-file-other-window

You can do this by typing Mx customize-variable <ENTER> org-link-frame-setup <ENTER> . 您可以通过键入Mx 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 . 单击find-file-other-window旁边的Value Menu ,然后选择find-file-other-frame ,然后单击Save for future sessions

One option is to tell Emacs to never split windows, which can be done like so: 一种选择是告诉Emacs永远不要分割窗口,这可以这样做:

(setq same-window-regexps '("."))

This will keep your window from splitting, and then you use your regular commands to switch buffers to get back to what you were looking at. 这将使您的窗口不会分裂,然后您使用常规命令切换缓冲区以回到您正在查看的内容。

This is as opposed to what it sounds like you were asking for, which was new frames , which IMO doesn't really help if you have limited screen real estate because you're now having to switch frames (graphical windows). 这与你要求的声音相反,这是新的 ,如果你的屏幕空间有限,IMO并没有真正帮助,因为你现在不得不切换帧(图形窗口)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM