emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Gustav Wikström" <gustav@whil.se>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	TRS-80 <trs-80@isnotmyreal.name>
Subject: Re: Any reason not to generate my own custom ID value (NOT CUSTOM_ID)?
Date: Thu, 10 Sep 2020 22:00:02 +0000	[thread overview]
Message-ID: <HE1PR0202MB2857EAD656FC70EDDB12E10DDA270@HE1PR0202MB2857.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <8e204de9ad9da09812991449c64d7aad@isnotmyreal.name>

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

Hi TRS-80,

Your approach should work just fine. So fine, in fact, that it's already kind of built in! Configure org-id-method and set it to 'ts and you'll get timestamps as ID instead of uuid.

I do believe the manual lacks a description for this. Not entirely sure though, and can't check atm. But the configuration is there none the less, and supported.

Kind regards
Gustav
________________________________
From: Emacs-orgmode <emacs-orgmode-bounces+gustav=whil.se@gnu.org> on behalf of TRS-80 <trs-80@isnotmyreal.name>
Sent: Thursday, September 10, 2020 10:02:45 PM
To: emacs-orgmode@gnu.org <emacs-orgmode@gnu.org>
Subject: Any reason not to generate my own custom ID value (NOT CUSTOM_ID)?

First, I want to express my sincere and heart-felt gratitude to Carsten
(and other contributors) for making and sharing this wonderful piece of
software.  I have come to refer to it as "one of the gateway drugs to
Emacs" (the other being Magit, IMHO).  It was certainly one of (if not
/the/) main reason(s) why I started using Emacs initially.

I could in fact gush all day, however people are busy, so, on to the
main issue...  :)

It seems to me that there is nothing really stopping me from inserting
whatever value I like for value of "ID" Property.  Based on brief
experimentation, org-store-link and org-insert-link seem to happily
accept whatever value is already there (which I entered manually, for
testing purposes).

However I seem to recall reading some warning somewhere about this,
although I cannot seem to find it right now.

What I would like to do, is generate my own ID values in a more human
readable format, something "ISO-like" for example "2020-09-10-1433" (as
opposed to the default "uuid" method).  These sort of ID are still
"Unique" (well, within my own system, anyway) as long as I am not
generating them more often than once per minute[0].  And they have the
advantages of being shorter, human readable, and meaningful.

Even when org-id-link-to-org-use-id and org-id-track-globally are both
set to "t", org-id seems happy to insert my "ISO-like" ID right into the
hash table and org-id-locations-file.

I do need the "across files" functionality.  My understanding is that
this is main difference between ID and CUSTOM_ID (the latter being local
only to the file).  Unless I am misunderstanding?

So, what am I missing here?  Any reason(s) /not/ to use my own custom ID
value?

In addition to the general case, one particular area I am unsure about
(as I have yet to get it working) is how this all works out with HTML
export, as that is something I also wanted to get working at some point.

I tried studying some of the related sources (as well as mailing list
archive), but could not seem to reach a conclusive answer.  I was hoping
that some more knowledgeable people could confirm
whether this is a really bad idea, or not.  Any feedback would be
greatly appreciated!

Cheers!

TRS-80

[0] It could easily be extended to second (or further) resolution, if
needed.  For me, minute resolution will be fine.


[-- Attachment #2: Type: text/html, Size: 4691 bytes --]

  reply	other threads:[~2020-09-10 22:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 20:02 Any reason not to generate my own custom ID value (NOT CUSTOM_ID)? TRS-80
2020-09-10 22:00 ` Gustav Wikström [this message]
2020-09-10 22:16   ` TRS-80
2020-09-13 20:18     ` Bastien
2020-09-10 22:20 ` Samuel Wales
2020-09-10 23:33   ` TRS-80
2020-09-11  1:06     ` Ihor Radchenko
2020-09-11  1:31       ` TRS-80
2020-09-11  7:51         ` Ihor Radchenko
2020-09-13 20:19           ` Bastien
2020-09-23  7:19           ` Bastien
2020-09-23  7:43             ` [PATCH] " Ihor Radchenko
2020-09-23  7:48               ` Bastien
2020-09-23  8:08                 ` Ihor Radchenko
2020-09-23  8:30                   ` Bastien
2020-09-23  8:40                 ` Ihor Radchenko
2020-09-23  8:48                   ` Bastien
2021-04-25 14:19                   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR0202MB2857EAD656FC70EDDB12E10DDA270@HE1PR0202MB2857.eurprd02.prod.outlook.com \
    --to=gustav@whil.se \
    --cc=emacs-orgmode@gnu.org \
    --cc=trs-80@isnotmyreal.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).