emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Custom <<anchor>> possibility?


From: Jean Louis
Subject: Re: Custom <<anchor>> possibility?
Date: Fri, 21 May 2021 02:00:31 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Samuel Wales <samologist@gmail.com> [2021-05-21 01:19]:
> thanks for pointing us to this variable.
> 
> docstring says "This process ensures that these values are unique and
> valid...", so it sounds like you could create non-unique or invalid
> identifiers without it.
> 
> does this mean, for example, if the user exports a subtree with two
> link targets with the same user label, then if this variable is
> non-nil, then the output could include more than one link target?

I may try to give the example here:

<<paragraph>>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam
lectus. Sed sit amet ipsum mauris. 

<<paragraph>>
Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut
tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper
ultricies.

which results in:

<a id="paragraph"></a>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam
lectus. Sed sit amet ipsum mauris. 
</p>

<p>
<a id="paragraph"></a>
Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut
tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper
ultricies.
</p>

> what if this var were nil [the default], my brain is not working well
> now, but it seems as if the exporter could still get confused which
> target to link to, even if it is not printing duplicatedly-named
> targets.
> 
> so i am curious what the purpose of the default is?

You already discovered the purpose: "This process ensures that these
values are unique and valid..."

Randomly generated internal hyperlinks are not part of author's
document creation and I don't believe they can be unique across all
documents as they rely on randomity, not uniqueness, but they may be
unique in one document. The sentence should say "This process ensures
that these values are unique to specific document and valid"

Problem with it is that those random anchors/links are random, and
that makes it a bad default for user. A user may bookmark the link 

https://www.example.com/doc#org2cf8625 with some title, but with the
next document generation same link may appear as
https://www.example.com/doc#org6ac9de0 and that means that bookmark
disappeared, at least for HTML export.

For me personally I am editing Org text (not files) on a meta level
where all objects have its unique ID and from there I can create Org
files. Then each object of a structure of meta level Org has its
unique ID. Also the document has its unique ID. Then it becomes
possible to automatically create anchors like <<1:17311:31121>> which
are truly unique across all documents, remain immutable, and are
trackable. With "trackable" I mean that it is possible to generate a
list of "referenced by" documents, documents which hyperlink to that
anchor.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




reply via email to

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