On Friday, October 10, 2025, [email protected] wrote: > On Fri, Oct 10, 2025 at 10:54:01AM +0200, Christian Barthel wrote: >> On Monday, October 06, 2025, [email protected] wrote: >> >> > On Mon, Oct 06, 2025 at 06:33:37PM +0200, Dr. Arne Babenhauserheide wrote: >> > >> > [...] >> > >> >> You’re right. I sidetracked myself looking at the example. The IDs I see >> >> in my org-files are uuids, so they are unique. >> > >> > ...until you copy one, that is. >> >> org-id-update-location generates a warning when this happens, >> like: > > But only whithin one file, I gather.
No, I don’t think so. I copied an ID from one item of todo.org into todo_2025.org and this is what the *Messages* buffer says: --8<---------------cut here---------------start------------->8--- Finding ID locations (1/19 files): /home/bch/doc/org/todo.org Finding ID locations (2/19 files): /home/bch/doc/org/todo_2025.org Duplicate ID "f3d005b2-9c2f-4cfb-a4e8-ec15c4d9dbbf" Finding ID locations (3/19 files): /home/bch/doc/org/future.org .... --8<---------------cut here---------------end--------------->8--- >> | ⛔ Warning (emacs): WARNING: 1 duplicate IDs found, check *Messages* buffer >> >> Would be nice when org-lint is also reporting that but right now, >> it seems not to check for duplicate IDs. > > See, it is complicated. Sometimes, you want it (e.g. backups, in the > widest sense of the word: files under .git or backup copies made by > an editor, for example). Sometimes you don't (duplicating one template, > for example). Yes, I think there is an option that deals with duplicating templates. See ‘org-clone-subtree-with-time-shift’ where you can specify to delete the ID. Or it does it automatically... I don’t remember. Anyway it works as expected and I do think that "a good way" would be that all org-mode related functions take care of the ID (i.e. when you clone an item, delete the ID because this is a clone or when you move it with org-refile, keep the ID etc..). > In the second case, you are forced to use special software > instead of saying "cp". > > I just wanted to hint at the sad fact that the seemingly simple concept > of an "UUID" is extremely fraught. People tend to give it magic properties > it just can't have. Yes - manually copying an UUID results into a non-unique UUID . But what other options are there when you want to uniquely identify an item that gets moved around and you can’t use outline-path? The only one thing where I can see a failure on my side is that I am not using CUSTOM_ID (ID may be an org-mode internal thing - it is mentioned in ‘4.5 Handling Links’). By and large - this is only a suggestion / question whether it is useful or not for org-store-link to use the "most unique identifier" to a certain place. I know that others might use org-mode in a complete different way than I am doing. -- Christian Barthel
