18
  1. Is there a way to link to specific topic (*) in a different org-file?
  2. How can I quickly find and copy the relative path from the current org-file to the file that I want to link to?

Probably both straight forward but I couldn't figure it out. Thanks your help.

17

For #2, first you'll want to add a couple of keybindings to your init file (these are the suggested keys in the Org manual) -

(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c C-l") 'org-insert-link)

then you can hit C-c l somewhere in or on the item you want to link to, then C-c C-l where you want to place the link. It'll ask you to confirm the location and then enter a link name - you can just hit enter to accept the defaults. It will create a link like [[file:foo.org::*bar][link-name]], which displays as link-name.

See http://orgmode.org/manual/Handling-links.html for more details.

  • C-c l you mean in dired? – cataclysmic Jan 17 '16 at 18:22
  • No, you hit C-c l in the org file you want to link to - it'll copy the link, then you can paste it with C-c C-l. – Brian Burns Jan 17 '16 at 18:41
  • On C-c l I get an is undefined ... error. – cataclysmic Jan 17 '16 at 18:45
  • Ah, sorry I forgot you need to create this binding yourself, though it's the standard - I'll amend the answer. – Brian Burns Jan 17 '16 at 19:01
  • 1
    @PaulBissex hmm, it works okay for me - it puts an absolute path to the originating file in the link. – Brian Burns Jan 24 at 22:30
6
  1. you can reference this topic http://orgmode.org/manual/External-links.html#External-links

    file:projects.org::some words text search in Org file

    file:projects.org::*task title heading search in Org file

  2. sorry, I don't know your means.

  • Thank you for the reply. With number 2 I mean how can I easily get the path to the file that I want to link to paste it into the link. – cataclysmic Jan 17 '16 at 16:10

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.