emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug? org-id-find not finding some IDs


From: Ihor Radchenko
Subject: Re: Bug? org-id-find not finding some IDs
Date: Tue, 16 Aug 2022 12:26:12 +0800

Jack Kamm <jackkamm@tatersworld.org> writes:

> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> Applied onto main via 8f5bf1725.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8f5bf172556564df89fb16ce8ecec68c5b7f0221
>
> My sincere apologies, but after a bit of testing, I found that my
> requested change had some unforeseen consequences, and I don't think
> it's a good idea anymore. So, I'd like to request reverting it.
>
> Doing some research, I found the behavior of org-id-update-id-locations,
> to not search all the open Org files, was made in this 2019 commit:
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9865e6bd8be65229be4eac4f459f62e47fab2be7
>
> The commit message suggests this change in behavior was
> intentional. Only, the docstring of org-id-extra-files wasn't updated to
> reflect the new behavior, which was the cause of confusion on my end.

That particular change has not been noticed in the relevant ML thread.
I disagree that skipping the open ID files is the right decision.
We already have org-id-get unconditionally adding arbitrary files
to the ID locations. This org-id-get can be triggered in various
unpredictable places inside Org and third-party packages. Thus, we cannot
really expect consistency even after reverting the commit.

> In terms of unforeseen consequences of the new commit: I found it caused
> some problems for org-caldav. When making changes, org-caldav copies
> entries into a backup file at ~/.emacs.d/org-caldav-backup.org. With the
> new commit, it is sometimes finding entries in this backup file instead
> of the correct file.

I suggest to bind org-id-track-globally to nil file-locally in that
backup file. I believe that org-id-track-globally, when set to t, is
expected to catch all the Org files in Emacs + user-specified files.
Skipping some opened files unpredictably, like it was done before
my commit is chaotic and also caused confusion in this area in my own
Org usage.

If necessary, we may add an extra customization like
org-id-exclude-files to explicitly exclude files from ID tracking.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



reply via email to

[Prev in Thread] Current Thread [Next in Thread]