* [Interest] Determanistic Org IDs
@ 2020-07-19 14:27 TEC
0 siblings, 0 replies; 4+ messages in thread
From: TEC @ 2020-07-19 14:27 UTC (permalink / raw)
To: org-mode-email
:PROPERTIES:
:ID: 1161308a-ef0c-4490-bb36-13634f8de727
:END:
User-agent: mu4e 1.4.10; emacs 26.3
Message-ID: <87r1t7mu52.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x102b.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int: -7
X-Spam_score: -0.8
X-Spam_bar: /
X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9,DKIM_ADSP_CUSTOM_MED=0.001,DKIM_INVALID=0.1,DKIM_SIGNED=0.1,FREEMAIL_FROM=0.001,NML_ADSP_CUSTOM_MED=0.9,RCVD_IN_DNSWL_NONE=-0.0001,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
Hello everyone,
I have an html export of an org file checked into VCS. To try to
reduce the 'noise' created by commiting the random org IDs
changing each time, I took @alphapapa's unpackaged.el
org-export-html-with-useful-ids-mode, tweaked it, and extended it
to cover other elements.
The end result it that the resulting html export is fully
determanistic. While I'm quite pleased with the result, it occured
to me that others might be interested in having their exports
behave like this.
From my usage, these are the percieved pros/cons.
Pros:
- Reduced 'noise' if exported files are commited - (With HTML)
links to particular elements in a file keep working across
multiple versions, most of the time
- (With HTML) links become more descriptive
Cons:
- Inceased chance of ID collisions across files Longer IDs I
- think this could make a nice option for export settings. I'm
- aware of the 9.5 feature freeze, but thought I'd mention the
- idea to see if there's any interest in it.
If you want to see what I've got happening, see
https://tecosaur.github.io/emacs-config/config.html#nicer-generated-heading.
Please let me know if this idea seems promising!
Timothy.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Interest] Determanistic Org IDs
[not found] <E1jxAkG-00052l-OS@lists.gnu.org>
@ 2020-07-20 3:45 ` TEC
0 siblings, 0 replies; 4+ messages in thread
From: TEC @ 2020-07-20 3:45 UTC (permalink / raw)
To: emacs-orgmode
Hi All,
Noticed some autoformatting happened on send. This is how the cons
paragraph /should/ read (with a minor correction as well).
*In last email*
> Cons: - Inceased chance of ID collisions across files Longer IDs
> I - think this could make a nice option for export settings.
> I'm - aware of the 9.5 feature freeze, but thought I'd mention
> the - idea to see if there's any interest in it.
*Should be*
Cons:
- Inceased chance of ID collisions across files
- Longer IDs
I think this could make a nice option for export settings. I'm
aware of the 9.4 feature freeze, but thought I'd mention the idea
to see if there's any interest in it.
Hope that makes things clearer.
Please do let me know what you think, this would be my second
contribution, so I still very much feel like I'm finding my feet.
All the best,
Timothy.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Interest] Determanistic Org IDs
[not found] <E1jxAju-0004Dk-3O@lists.gnu.org>
@ 2020-07-24 12:09 ` Alexander Adolf
2020-07-24 14:53 ` TEC
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Adolf @ 2020-07-24 12:09 UTC (permalink / raw)
To: TEC, org-mode-email
Hello Timothy,
TEC <tecosaur@gmail.com> writes:
> [...]
> Pros:
> - Reduced 'noise' if exported files are commited - (With HTML)
> links to particular elements in a file keep working across
> multiple versions, most of the time
> - (With HTML) links become more descriptive
>
> Cons:
> - Inceased chance of ID collisions across files Longer IDs I
> - think this could make a nice option for export settings. I'm
> - aware of the 9.5 feature freeze, but thought I'd mention the
> - idea to see if there's any interest in it.
>
> If you want to see what I've got happening, see
> https://tecosaur.github.io/emacs-config/config.html#nicer-generated-heading.
> [...]
Interesting. Just a thought: have you considered computing a SHA-2 hash
over either the totality of the heading and all its children (if you
want the links to change when the content changes), or only the heading
itself (keeping the id invariant for as long as the heading remains
unchanged, but content below it can change)?
This would have the advantage of solving both, your "noise issue" and at
the same time removing the threat of id collisions; but at the cost of
not having "speaking" links.
Hoping to have helped,
--alexander
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Interest] Determanistic Org IDs
2020-07-24 12:09 ` [Interest] Determanistic Org IDs Alexander Adolf
@ 2020-07-24 14:53 ` TEC
0 siblings, 0 replies; 4+ messages in thread
From: TEC @ 2020-07-24 14:53 UTC (permalink / raw)
To: Alexander Adolf; +Cc: org-mode-email
Alexander Adolf <alexander.adolf@condition-alpha.com> writes:
> Hello Timothy,
Hi :)
> Interesting. Just a thought: have you considered computing a
> SHA-2 hash...
I have not. Simply put, I fail to see any advantage.
> This would have the advantage of solving both, your "noise
> issue" and at the same time removing the threat of id
> collisions; but at the cost of not having "speaking" links.
As it stands there is no issue with ID collisions within the same
file, just in-case you wanted to look across files.
This is ensured in the (while (--any (equal ref (car it)) cache)
... block.
All the best,
Timothy.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-24 14:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1jxAju-0004Dk-3O@lists.gnu.org>
2020-07-24 12:09 ` [Interest] Determanistic Org IDs Alexander Adolf
2020-07-24 14:53 ` TEC
[not found] <E1jxAkG-00052l-OS@lists.gnu.org>
2020-07-20 3:45 ` TEC
2020-07-19 14:27 TEC
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).