From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-id fixups and minor changes Date: Sat, 10 Aug 2019 00:33:32 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a20d89058fb6c488" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55434) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwDSK-0000Kg-Ri for emacs-orgmode@gnu.org; Fri, 09 Aug 2019 18:33:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwDSJ-0001QA-BY for emacs-orgmode@gnu.org; Fri, 09 Aug 2019 18:33:52 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:44497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hwDSJ-0001NS-4O for emacs-orgmode@gnu.org; Fri, 09 Aug 2019 18:33:51 -0400 Received: by mail-ed1-f51.google.com with SMTP id k8so96540235edr.11 for ; Fri, 09 Aug 2019 15:33:50 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?UTF-8?Q?Gustav_Wikstr=C3=B6m?= Cc: "emacs-orgmode@gnu.org" --000000000000a20d89058fb6c488 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Gustav, I can see that it feels more natural to use timestamps. I certainly see that relative file names are good for across-computer compatibility. You system assumes, if I see that correctly (have not studied it yet), that not more that one ID will be created per second. Or do you have something in place that will catch this, for example if someone uses the mapping API to assign IDs to a whole bunch of entries in a short time? You are right that this is not documented in the manual, even though it is used for lings and for attachments. Maybe it would be good to explain it in an appendix to the manual? Would you like to draft such a section, since you have been looking into this problem? Do you think the default setting for Org should be modified? Carsten On Fri, Aug 2, 2019 at 5:14 PM Gustav Wikstr=C3=B6m wrote: > Hi! > > I've pushed a couple of fixes and changes to master related to org-id. > > First; a fix and a (major) speedup and method-change for how the > global caching works for ID's. The change in method is that providing > file's as arguments to org-id-update-id-locations no longer breaks the > existing id locations. > > Second; I've added a customization so one can choose to cache the > id-locations as relative to the org-id-locations-file instead of as > absolute links. This helps a lot when running a system mirrored on > multiple machines where the absolute paths to ones documents might > differ, but where it's all the same relative to the > org-id-locations-file. > > Third; I've added another ID generator method. The extremists might > say the new method is not unique enough but org-mode is a personal > system first and foremost, so I think there is merit to this new ID > method. It creates ID's based on current timestamp and doesn't try to > hide the timestamp from the user. One might call the ID's "natural" > since they are contain information in themselves. Certainly a good > thing for some. The new method will not be active unless explicitly > chosen by the user. > > As a side note, if using ID's together with attachments, try this > new ID-generator out by setting org-id-method to ts (short for > timestamp) and change the org-attach-id-to-path-function to > something like "YYYY/MM/DDTHHMMSS" for more human readable > attachment folders. > > Org-id is next to undocumented in the manual so I didn't find a good > place to add this. A few lines are added to org-news though. > > This is the first push by me without first doing an RFC. So, > naturally, if anything is out of order mail back and/or make changes > directly in the repo if needed. Tests passed anyways. > > Kind regards > Gustav > > --000000000000a20d89058fb6c488 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Gustav,

I can see that it feels more= natural to use timestamps.=C2=A0 I certainly see that relative file names = are good for across-computer compatibility.

You sy= stem assumes, if I see that correctly (have not studied it yet), that not m= ore that one ID will be created per second.=C2=A0 Or do you have something = in place that will catch this, for example if someone uses the mapping API = to assign IDs to a whole bunch of entries in a short time?

You are right that this is not documented in the manual, even thou= gh it is used for lings and for attachments.=C2=A0 Maybe it would be good t= o explain it in an appendix to the manual?=C2=A0 Would you like to draft su= ch a section, since you have been looking into this problem?

=
Do you think the default setting for Org should be modified?

Carsten

On Fri, Aug 2, 2019 at 5:14 PM Gustav Wi= kstr=C3=B6m <gustav@whil.se> wr= ote:
Hi!

I've pushed a couple of fixes and changes to master related to org-id.<= br>
First; a fix and a (major) speedup and method-change for how the
global caching works for ID's. The change in method is that providing file's as arguments to org-id-update-id-locations no longer breaks the<= br> existing id locations.

Second; I've added a customization so one can choose to cache the
id-locations as relative to the org-id-locations-file instead of as
absolute links. This helps a lot when running a system mirrored on
multiple machines where the absolute paths to ones documents might
differ, but where it's all the same relative to the
org-id-locations-file.

Third; I've added another ID generator method. The extremists might
say the new method is not unique enough but org-mode is a personal
system first and foremost, so I think there is merit to this new ID
method. It creates ID's based on current timestamp and doesn't try = to
hide the timestamp from the user. One might call the ID's "natural= "
since they are contain information in themselves. Certainly a good
thing for some. The new method will not be active unless explicitly
chosen by the user.

=C2=A0 =C2=A0 As a side note, if using ID's together with attachments, = try this
=C2=A0 =C2=A0 new ID-generator out by setting org-id-method to ts (short fo= r
=C2=A0 =C2=A0 timestamp) and change the org-attach-id-to-path-function to =C2=A0 =C2=A0 something like "YYYY/MM/DDTHHMMSS" for more human r= eadable
=C2=A0 =C2=A0 attachment folders.

Org-id is next to undocumented in the manual so I didn't find a good place to add this. A few lines are added to org-news though.

This is the first push by me without first doing an RFC. So,
naturally, if anything is out of order mail back and/or make changes
directly in the repo if needed. Tests passed anyways.

Kind regards
Gustav

--000000000000a20d89058fb6c488--