In org mode, a file can be included for export using #+Include: filename
. Is there an easy way to open a file in an include statement?
I've tried C-c C-o, but emacs states "no link found".
There is a command called org-edit-src-exit
in org-mode, which can open source block in a new buffer of itself major mode, and open Include file.
This command is binded with C-c '
in default.
-
-
Same as editing source blocks, I'm not sure why I didn't think to try that. – user2699 Feb 28 '15 at 19:47
-
Although,
org-edit-special
which is usually bound toC-c '
does not respect the:lines
parameter which is ubiquitous inorg-mode
's#+INCLUDE
. That is, when you doorg-edit-special
you will always end up at the beginning of the file or at the point you left your cursor. – foki May 23 '18 at 18:51
There exists a generic solution not limited to org-mode
:
M-x ffap
(alias of find-file-at-point
) does exactly what it sounds like it does.
helm-find-files
also automatically populates the minibuffer with the filename at the point if one exists.
Use one of these commands and then hit return to visit the file under the point.