Skip to main content
2 of 5
deleted 3 characters in body
crocefisso
  • 1.5k
  • 10
  • 22

How to occasionally open an org link in current buffer?

When I do C-c C-o on an org link it opens the org file in a new frame. This is fine, but sometimes I'd prefer to open org files in the current buffer, creating a new key binding for the matter (for example "C-c <C-return>").

I've tried to adapt some code I found on emacs.stackexchange, namely :

How to force Org-mode to open a link in another frame?

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

and Open org link in the same window

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

But my understanding of Elisp is so poor that I didn't manage to do it...

crocefisso
  • 1.5k
  • 10
  • 22