i often make links in Org Mode to files, which should open in emacs, but in another buffer than the one, which contains the link.
It would be the best, if they open in a buffer next to the one I work in.
How can i do that?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityPlease have a look at the variable org-link-frame-setup
. In its documentation string you'll find the searched for information.
You might do this with the keyboard sequence C-h v
and then typing above name.
(file . find-file-other-window)
within org-link-frame-setup
you want (file . my-custom-find-file-other-window)
and write up your custom function -- e.g., see the following thread for an example of how to create a function that targets a specific window: stackoverflow.com/a/41095888/2112489
my-custom-find-file-other-window
referred to in the previous comment, beware of dedicated windows that resist being targeted: gnu.org/software/emacs/manual/html_node/elisp/…
C-h r
) to make sure.file:
links in another window andid:
links in the same window.