Following Org Links Outside of Org

Tony Aldon has been busy posting informative articles to the Emacs reddit. One of his latest discusses org-open-at-point-global, a way of following a link formatted in Org syntax even if it’s not within an Org buffer. That’s something I didn’t know about but can be pretty handy. Rather than killing the link and pasting it into Emacs, your browser, or some other application, you simply put the point on the link and call org-open-at-point-global.

The example Aldon uses has two links before the definition of a user-defined function in an init.el file. One, [[help:pcase]], was a link to the HELP entry for pcase. The other, [[info:elisp#Current Buffer]], was a link to the Elisp info node for “Current Buffer”. Both links are in a comment in an Elisp buffer so they are in no way active as Org links. Nonetheless, org-open-at-point-global will follow the link by popping up a buffer to the appropriate place.

Almost all my non-code text buffers are Org buffers so Aldon’s example is perfect for me. If I want to put a link to something in a source code buffer, I can use the usual Org syntax in a comment and follow it easily if I need to.

It turns out that there’s an edge case concerning link definitions that Aldon discusses but other than that, org-open-at-point-global will faithfully follow any link. The link definition issue was raised on the Org-mode list so perhaps the edge case will be fixed.

To be sure, org-open-at-point-global is a small thing that’s not going to revolutionize anyone’s workflow but it’s still useful and I’m glad to have discovered it from Aldon’s post.

This entry was posted in General and tagged , . Bookmark the permalink.