9
votes

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?

2
It would appear that the two answers below have you covered but your question could be a little clearer: do you want the new file to consume all the space in the current Emacs window (which makes it a new buffer in the existing window), or do you want, in fact, a new window in a separate frame?pajato0

2 Answers

11
votes

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.

9
votes

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