0

How can I see a list of internal links in an org-mode document? I would like a quick way to link within my document without needing to retype/remember all my internal links.

The documentation states,

To insert a link targeting a headline, in-buffer completion can be used. Just type a star followed by a few optional letters into the buffer and press M-TAB. All headlines in the current buffer will be offered as completions.

The key binding M-TAB, however, toggles the desktop environment's "switch to open application" functionality:

* Header1 <<h1>>
** Subheader1
   This is where I would like to reference *

enter image description here

Reading the documentation for handling links, I have tried placing my cursor on the <<h>> target and manually calling org-store-link. Emacs processes for a moment. However, I am unable to use TAB for completion, in the buffer or minibuffer, and the stored target is not in the history accessed by M-p/M-n:

C-c C-l (org-insert-link)

...

Inserting stored links

All links stored during the current session are part of the history for this prompt, so you can access them with UP and DOWN (or M-p/n).

1

The manual suggests using Esc-Tab when M-Tab is captured by the desktop environment.

I tried this but found the completion to be underwhelming. Here is what I did instead: (making use of Ivy and some extra code)

How to auto-complete links to headlines in org-mode?

  • Ah yes, didn't even consider Esc, as I'm an evil-mode (Vim) user. I'm glad you mention it though. I also appreciate the pointer to the Pragmatic Emacs solution. That gives me a path to go down when I have time to trial/research things. Cheers! – Lorem Ipsum Aug 28 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.