Christian Barthel <[email protected]> writes:

> Hello, I usually prefer using org-id’s (stored in the ID
> Property) for linking and referencing.  This patch would
> use an existing ID value instead of a filename path.
>
> Example:
>
> --8<---------------cut here---------------start------------->8---
> * something
> :PROPERTIES:
> :ID: 12345
> :END:
>
> ... some <<anchor>>
>          ^
> --8<---------------cut here---------------end--------------->8---
>
> When cursor is at the above line of "^", it stores a link with
> the ID and org-insert-link would be something like that:

> [[id:12345::anchor]]
>
> Other ideas/options: a variable to control the behavior?

Thanks for the patch!
The feature you describe generally makes sense, but it should honor
`org-link-context-for-files' and `org-id-link-use-context'. What you
need to modify is `org-link-precise-link-target', not `org-store-link'
itself.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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