0

Following situation:

* Headline
:PROPERTIES:
:CUSTOM_ID: ignore_it
:END:
...
...
long text
...
...
<<this is the target>> ...
.....
some other long text

With org-store-link (C-c l) I get a link to the headline and not to the target in <<..>>. This is annoying if I have a long text between the CUSTOM_ID and the real target.

Any idea to solve this?


EDIT: According the documentation I shouldn't have the problem:

"For Org files, if there is a '<< target>>' at point, the link points to the target. Otherwise it points to the current headline, which is also the description."

I have the latest version. 9.4.

4
  • 1
    Where is your cursor when you press C-c l? If you place it in the link and then press C-c l there should be no problem. – NickD May 4 at 13:51
  • @NickD Unfortunately, it doesn't work. I've also tested it with a clean init.el (emacs -Q). Emacs uses the headline name (i.e. "file.org::*Headline") or the CUSTOM_ID or the global ID. – rl1 May 4 at 16:26
  • 1
    There does seem some funkiness going on. I would report it as a bug with M-x org-submit-bug-report.When I try it, I get two links stored in org-stored-links, so when I use C-c C-l to insert a link, I can go <Up> twice in the history: that seems to be the correct link. The first one is the CUSTOM_ID one. Do you get the same thing? – NickD May 4 at 17:03
  • @NickD "funkiness" describes it well. I get the same thing, but not always. Sometimes it's correct. And sometimes if I use 'C-c C-l' a second time, I get the correct link. – rl1 May 4 at 18:51

Your Answer

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

Browse other questions tagged or ask your own question.