When I follow from one Org file to another via a link, the new file appears in alternative window if there is one. Is there a way to follow links staying in the same window?

For example, I use a frame with two horizontally split windows. Left is for code, right is for docs in Org format. If I follow a link in the right window, the new Org file is opened on the left side, and I do not see the buffer with a code anymore.

2 Answers 2


The behaviour for opening files is set in org-link-frame-setup.

By default, the behaviour for opening files is file-find-other-window.

The following two alternative commands will change that so that find-file is executed instead of find-file-other-window:

(setf (cdr (assoc 'file org-link-frame-setup)) 'find-file)
(setf (cdr (rassoc 'find-file-other-window org-link-frame-setup)) 'find-file)

This works for me:

  (setq org-link-frame-setup
   '((vm . vm-visit-folder-other-frame)
     (vm-imap . vm-visit-imap-folder-other-frame)
     (gnus . org-gnus-no-new-news)
     (file . find-file)
     (wl . wl-other-frame)))

The above code was automatically generated by Emacs when I customized the variable. I merely recast it using setq.

  • please explain/reason a little your response
    – Muihlinn
    Jan 14, 2021 at 16:32
  • enough, add it to response and it's good.
    – Muihlinn
    Jan 14, 2021 at 17:02
  • 2
    In the end I also changed it via customization, but I decided to leave it where it is and do not use setq for it. Jan 15, 2021 at 12:06
  • There is no problem with that. I use setq because it helps me to better organize my configurations together.
    – Edman
    Jan 15, 2021 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.