emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] org-id: allow using parent's existing id in links to headlin


From: Ihor Radchenko
Subject: Re: [PATCH] org-id: allow using parent's existing id in links to headlines
Date: Sat, 16 Dec 2023 14:20:24 +0000

"Rick Lupton" <mail@ricklupton.name> writes:

> Thanks for the example and explanation. Yes that does make sense, mostly. I 
> assume this would look like this in org-store-link:
>
> (let ((org-link-context-for-files (org-xor org-link-context-for-files (equal 
> arg '(4))))
>     (...call store link functions...))

Yes.

> The meaning of `org-link-context-for-files' is then shifting from being 
> "should file: links include search strings (and how much should be included 
> when the region is active)" from "should any link that supports search 
> strings include them (and how much should be included when the region is 
> active)". Is it necessary to rename it to reflect this? (e.g. to 
> `org-link-use-context' or similar).

I do not think so - with your addition, we are still linking to files.
May simply update the docstring for `org-link-context-for-files' and
`org-store-link'.

> It's also then less clear what the role of `org-id-link-use-context' is and 
> how it interacts with `org-link-context-for-files'. I had included 
> `org-id-link-use-context' to give a way to opt out of the new behaviour (i.e. 
> using the update discussed above, a search string is added if (and 
> org-link-context-for-files org-id-link-use-context) ). But perhaps this is 
> also unnecessarily complicated, and `org-id-link-use-context' could be 
> removed again completely?

I do not think so - it is important to keep an option for users to
return to previous behaviour.

We might, in theory, modify `org-link-context-for-files' to allow
per-link type customization (then, people could set things back to
"context just for file: links"), but it would be more complicated IMHO.

-- 
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]