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

匆匆过客 提交于 2020-01-12 07:38:47

问题


I'm a new emacs user using emacs for the awesome org-mode. 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?


回答1:


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.




回答2:


One option is to tell Emacs to never split windows, which can be done like so:

(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).



来源:https://stackoverflow.com/questions/1854214/how-do-i-keep-emacs-org-mode-from-splitting-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!