1

I create the id of the heading (with org-id-copy function) and somewhere in the file i create link to it: [[id:XXXXXXXXXXXXXXXXXXXXX][name]]. The problem is that the link works only on the computer i created it. When i move the file to another computer, the link stops working, giving the error: No match - create this as new heading? (y/n)

How can i make it work on another computer? Is there any function to scan all ids and make links work again?

1

I do not know the answer for your specific question. But alternatively using org-store-link (I bind it to C-c l) to store the link to the heading and then insert the link with org-insert-link (I bind it to C-c C-l) will do what you want, since org-store-link will make a link containing the location of the org file.

If you want to be able to change the heading names freely, then you can add CUSTOM_ID property to the target heading and generate a link to it (for example, [[#my_casutom_id]]). Then you can freely change the heading itself without breaking the link.

  • There's one problem with this solution - when my headings change names, the links stop working completely. That's why i want to use org-id-copy. If it only was working on different computers too (i'm syncing my org file with 2 computers). – Kossak May 10 '15 at 20:06
  • No, at least by default (?), when using the above key bindings, Org creates a PROPERTY with a hash at the target headline, and then insert a link with the same hash where you wanna put your links. – fniessen May 10 '15 at 20:28
  • What property name is added when you use it org-store-link? I have the same keybindings, but for me the functions only copy/paste the name of the heading, not any properties. – Kossak May 10 '15 at 22:17
  • 1
    You can add CUSTOM_ID property and generate a link to it as well. Then you can freely change the heading itself without breaking the link. – joon May 11 '15 at 3:08
  • @joon this is the solution, i used CUSTOM_ID property and link in the format [[#my_custom_id]] and it works across different computers. Can you post it as an answer so i can mark it as solution? Thank you. – Kossak May 11 '15 at 18:35
1

I prefer org-id solution over CUSTOM_ID property.

To have it working across multiple machines you simply need to run org-id-update-id-locations after moving your file to another machine!

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.