emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Jack Kamm <jackkamm@tatersworld.org>
Cc: emacs-orgmode@gnu.org,  gustav@whil.se
Subject: Re: Bug? org-id-find not finding some IDs
Date: Tue, 16 Aug 2022 12:26:12 +0800	[thread overview]
Message-ID: <87y1vozue3.fsf@localhost> (raw)
In-Reply-To: <87mtc6ohhx.fsf@gmail.com>

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	other threads:[~2022-08-16  4:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  1:45 Bug? org-id-find not finding some IDs Jack Kamm
2022-08-04  2:24 ` Ihor Radchenko
2022-08-05  5:32   ` Jack Kamm
2022-08-05 12:46     ` Ihor Radchenko
2022-08-14 17:35       ` Jack Kamm
2022-08-16  4:26         ` Ihor Radchenko [this message]
2022-08-20 15:27           ` Jack Kamm

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=87y1vozue3.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gustav@whil.se \
    --cc=jackkamm@tatersworld.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 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).