all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: Properties ID vs. CUSTOM_ID
Date: Thu, 22 Dec 2016 13:02:05 -0800	[thread overview]
Message-ID: <87k2arznhu.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 874m1voii4.fsf@artlab.createcnix.lan

Christophe Schockaert <R3vLibre@citadels.eu> writes:

> Eric Abrahamsen writes:
>
>> Karl Voit <devnull@Karl-Voit.at> writes:
>>
>>> I'd prefer using manually written :ID: instead since migration would
>>> not be trivial to me.
>>
>> You could also use the `org-property-set-functions-alist' trick with the
>> :ID: property. If you added an "ID" entry to that alist, Org's usual
>> automatic id creation would be unaffected, but if you set ID manually,
>> you could write a function that would first prompt for your
>> human-readable string, then check for ID uniqueness and append random
>> characters to your string until it was unique. I think that would be a
>> nice addition to org-id.el.
>>
>> Eric
> I thikn the tricky part would be that we can only ensure ID uniqueness
> for the current agenda at the time of the ID creation. What if we later
> merge another set of files where ID were created independantly to our
> acustomed agenda files ?
>
> I like the idea of assigning a date since we would reduce chances to
> define at the same time the same string and the same day. If meticulous,
> we could assign a date and a time or random string as you suggest, Eric
> (a tiny UUID :).
>
> I think I read somewhere the first inactive timestamp could be used to
> tag an entry with a date. At least, I do that frequently.
>
> Thus, if available, we could even use it as a date when creating the ID
> in order to have an indication of the creation time for the heading
> instead of creation time of the link.
>
> Here it is for my suggestions.
>
> Dates might not be appropriate for every situation, though...

I think including some sort of timestamp in the id would likely solve
the problem of future conflicts. I don't think adding the actual date
into the ID string would be that useful (how often would you be
comparing dates from the ID property?), but the human-readable string
could have a hash of the string plus (current-time) appended to it. Or,
perhaps better, a hash of the outline path plus current-time.

E

  reply	other threads:[~2016-12-22 21:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 12:43 org-depend: dependencies between TODO entries in different files Karl Voit
2016-08-25 14:44 ` Nicolas Goaziou
2016-08-25 15:11   ` Karl Voit
2016-12-08  6:44     ` Carsten Dominik
2016-12-08 10:16       ` Jorge Morais Neto
2016-12-08 11:11         ` Samuel Loury
2016-12-12 10:21         ` Jorge Morais Neto
2016-12-08 14:37       ` Nicolas Goaziou
2016-12-11 22:19       ` Christophe Schockaert
2016-12-12 11:57         ` Karl Voit
2016-12-12 13:57           ` Carsten Dominik
2016-12-12 15:17             ` Karl Voit
2016-12-12 22:23               ` Christophe Schockaert
2016-12-18 12:12               ` org-depend improvements: ID picker Karl Voit
2016-12-18 17:49                 ` Eric Abrahamsen
2016-12-20 20:01                   ` a general " Karl Voit
2016-12-20 21:21                     ` Eric Abrahamsen
2016-12-18 12:14               ` Automatically Generating IDs From Title and Date Karl Voit
2016-12-18 19:36                 ` Samuel Wales
2016-12-20 19:57                   ` Properties ID vs. CUSTOM_ID (was: Automatically Generating IDs From Title and Date) Karl Voit
2016-12-22 10:03                     ` Karl Voit
2016-12-22 14:29                       ` John Kitchin
2016-12-22 15:30                         ` Properties ID vs. CUSTOM_ID Karl Voit
2016-12-22 15:40                           ` John Kitchin
2016-12-22 19:23                             ` Christophe Schockaert
2016-12-22 15:54                           ` Eric Abrahamsen
2016-12-22 19:45                             ` Christophe Schockaert
2016-12-22 21:02                               ` Eric Abrahamsen [this message]
2016-12-22 21:31                                 ` Carsten Dominik
2016-12-22 21:39                                   ` Carsten Dominik
2016-12-22 21:40                                   ` Eric Abrahamsen
2016-12-22 22:19                                     ` Christophe Schockaert
2016-12-22 17:10                           ` Samuel Wales
2016-12-22 17:13                             ` Samuel Wales
2016-12-18 12:17               ` org-depend improvements: TRIGGER in Combination With Set SCHEDULED Karl Voit
2016-12-18 12:18               ` org-depend improvements: Canceled Tasks Do Cancel Their Dependencies as Well Karl Voit
2016-12-12 19:25             ` org-depend: dependencies between TODO entries in different files Samuel Wales
2016-12-12 21:13               ` Karl Voit
2016-12-18 19:27                 ` Samuel Wales

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

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

  git send-email \
    --in-reply-to=87k2arznhu.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /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 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.