In Org-mode it is possible to have links and top open links. As listed by http://orgmode.org/orgcard.txt in Org-mode C-u C-c C-o or mouse-3 forces links to open in another window. How can I do the corresponding for frames, that is, how can I force a link to open in another frame?
What I want is for C-c C-o to work as per default but C-u C-c C-o to force the link to be opened in another frame.
(For the distinction of windows and frames see http://www.gnu.org/software/emacs/manual/html_node/emacs/Frames.html.)
I am running Org-mode 7.6 in 23.3.1.
I just tested and you can get it to work by wrapping org-open-at-point
in a (let )
as a custom function.
In this case I'm just prefixing the current org-link-frame-setup
with your desired find-file-other-frame
to ensure that if you use the command on another link type it will not fail.
(defun zin/org-open-other-frame ()
"Jump to bookmark in another frame. See `bookmark-jump' for more."
(interactive)
(let ((org-link-frame-setup (acons 'file 'find-file-other-frame org-link-frame-setup)))
(org-open-at-point)))
I suspect you will need to bind it to a key sequence other than C-u C-c C-o
, unless Emacs will permit you to bind it to that sequence specifically.
Have a look at the variable org-link-frame-setup
(M-x customize-variable RET org-link-frame-setup
). The docstring should explain the approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With