How to make a link to external file line in Emacs org-mode

If I understand the question right you can do it automatically with two org-mode commands:

Move the point to a line in a php file and M-x org-store-link.

Go to an org file and C-c C-l or M-x org-insert-link and follow the instructions in the minibuffer.

You are done, click the link or C-c C-o when the point is on it to open the link.

I have org-store-link on C-c l and org-insert-link on the default C-c C-l. This makes the process very convenient and fast to execute.

Have fun with org-mode.


Use this notation in the org mode to create a link:

[[/path/to/file.php::line][string-to-display]]

If you want the file name to be displayed, use just

[[/path/to/file.php::line]]

See Hyperlinks in the Org mode Info page for details and other ways to specify links.

Tags:

Emacs

Org Mode