all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org version 9.7 and id: links
@ 2024-11-08 16:14 Sébastien Gendre
  2024-11-08 18:29 ` Rick Lupton
  0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Gendre @ 2024-11-08 16:14 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

Hello,

On the Org-mode version 9.7 release note [1], there is a new feature I do
not understand. It's the "id:" links support search options.

The release note say:


> id: links support search options; org-id-store-link adds search option
> by default
> 
> Adding search option by org-id-store-link can be disabled by setting
> org-id-link-use-context to nil, or toggled for a single call by
> passing universal argument.
> 
> When using this feature, IDs should not include ::, which is used in
> links to indicate the start of the search string. For backwards
> compatibility, existing IDs including :: will still be matched (but
> cannot be used together with search option). A new org-lint checker
> has been added to warn about this.

What are the id: search options ? How does it work and how to use it ?


Best regards

-------
Gendre Sébastien


[1] https://orgmode.org/Changes.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org version 9.7 and id: links
  2024-11-08 16:14 Org version 9.7 and id: links Sébastien Gendre
@ 2024-11-08 18:29 ` Rick Lupton
  2024-11-10 20:27   ` Sébastien Gendre
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Lupton @ 2024-11-08 18:29 UTC (permalink / raw)
  To: Y. E.

Hi,

See https://orgmode.org/manual/Search-Options.html

Best
Rick

On Fri, 8 Nov 2024, at 4:14 PM, Sébastien Gendre wrote:
> Hello,
>
> On the Org-mode version 9.7 release note [1], there is a new feature I do
> not understand. It's the "id:" links support search options.
>
> The release note say:
>
>
>> id: links support search options; org-id-store-link adds search option
>> by default
>> 
>> Adding search option by org-id-store-link can be disabled by setting
>> org-id-link-use-context to nil, or toggled for a single call by
>> passing universal argument.
>> 
>> When using this feature, IDs should not include ::, which is used in
>> links to indicate the start of the search string. For backwards
>> compatibility, existing IDs including :: will still be matched (but
>> cannot be used together with search option). A new org-lint checker
>> has been added to warn about this.
>
> What are the id: search options ? How does it work and how to use it ?
>
>
> Best regards
>
> -------
> Gendre Sébastien
>
>
> [1] https://orgmode.org/Changes.html
>
> Attachments:
> * signature.asc


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org version 9.7 and id: links
  2024-11-08 18:29 ` Rick Lupton
@ 2024-11-10 20:27   ` Sébastien Gendre
  2024-11-11  7:05     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Gendre @ 2024-11-10 20:27 UTC (permalink / raw)
  To: Rick Lupton; +Cc: Y. E.

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

Hi,

Thank you for you reply.

So, if I understand correctly:

* On a "file:" link, it is possible to add "::#custom-id" at the end to
  tel Org-mode to search the "custom-id" as a target of the link

* With Org 9.7, an "id:" can also have "::#custom-id" at the end

* "org-id-store-link" add it by default


But an "id:" link already contain an ID, why adding it a second time at
the end of the link ?



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

> Hi,
>
> See https://orgmode.org/manual/Search-Options.html
>
> Best
> Rick
>
> On Fri, 8 Nov 2024, at 4:14 PM, Sébastien Gendre wrote:
>> Hello,
>>
>> On the Org-mode version 9.7 release note [1], there is a new feature I do
>> not understand. It's the "id:" links support search options.
>>
>> The release note say:
>>
>>
>>> id: links support search options; org-id-store-link adds search option
>>> by default
>>> 
>>> Adding search option by org-id-store-link can be disabled by setting
>>> org-id-link-use-context to nil, or toggled for a single call by
>>> passing universal argument.
>>> 
>>> When using this feature, IDs should not include ::, which is used in
>>> links to indicate the start of the search string. For backwards
>>> compatibility, existing IDs including :: will still be matched (but
>>> cannot be used together with search option). A new org-lint checker
>>> has been added to warn about this.
>>
>> What are the id: search options ? How does it work and how to use it ?
>>
>>
>> Best regards
>>
>> -------
>> Gendre Sébastien
>>
>>
>> [1] https://orgmode.org/Changes.html
>>
>> Attachments:
>> * signature.asc

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org version 9.7 and id: links
  2024-11-10 20:27   ` Sébastien Gendre
@ 2024-11-11  7:05     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2024-11-11  7:05 UTC (permalink / raw)
  To: Sébastien Gendre; +Cc: Rick Lupton, Y. E.

Sébastien Gendre <seb@k-7.ch> writes:

> * With Org 9.7, an "id:" can also have "::#custom-id" at the end
>
> * "org-id-store-link" add it by default
>
>
> But an "id:" link already contain an ID, why adding it a second time at
> the end of the link ?

Example 1:

You have top-level property drawer in a file:
:PROPERTIES:
:ID: file-id
:END:

Then, you can refer to headings in the file as
[[id:file-id::heading-id]] instead of
[[file:/path/to/file/that/may/change::heading-id]].

Example 2:

You have a subtree with only the topmost heading with ID. You do not
want to pollute child headings with PROPERTIES drawer, but you cannot
reference them using [[*heading]] links either because the child heading
titles are not unique. Then, you can do
[[id:parent-id::*child title]] to refer to a child.

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-11 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 16:14 Org version 9.7 and id: links Sébastien Gendre
2024-11-08 18:29 ` Rick Lupton
2024-11-10 20:27   ` Sébastien Gendre
2024-11-11  7:05     ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.