emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] org-store-link on document title


From: Ihor Radchenko
Subject: Re: [BUG] org-store-link on document title
Date: Wed, 28 Jun 2023 19:56:42 +0000

Anthony Carrico <acarrico@memebeam.org> writes:

> To duplicate:
>
> Create file test.org as in this example:
> #+begin_example
> #+TITLE: test org title link
> #+end_example
>
> 1. go to title line of test.org, and do org-store link: 'C-c l'
> 2. go to new file test2.org, and do org-insert-link: 'C-c C-l M-p <RET>'
>
> Here is the actual file test2.org produced by this method:
> #+begin_example
> [[file:test.org::+TITLE: test org title link]]
> #+end_example
>
> This isn't great because there is no description.

Org does not know if you want to store link to file or to this specific
line. The current default is trying to store link to current line,
stripping "#" to disambiguate from custom ID search string.
See 4.8 Search Options in File Links

> 1. Expected file test2.org:
> #+begin_example
> [[file:test.org::+TITLE: test org title link][test org title link]]
> #+end_example
>
> Or even better:
>
> 2. Desired file test2.org:
> #+begin_example
> [[file:test.org][test org title link]]
> #+end_example

You can set `org-id-link-to-org-use-id' to non-nil (4.5 Handling Links).
Then, Org will store link to current file/heading instead of more
generic link. Latest version of Org will also auto-assign TITLE as the
link description.

Canceled.
You may consider sending patch for Org manual if you think that we can
do a better job describing how Org handles links.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]