emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug? org-id-find not finding some IDs
@ 2022-08-02  1:45 Jack Kamm
  2022-08-04  2:24 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Jack Kamm @ 2022-08-02  1:45 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

The documentation for org-id-extra-files suggests that org-id-find
should search in Org files visited by Emacs:

> When Org reparses files to remake the list of files and IDs it is
> tracking, it will normally scan the agenda files, the archives
> related to agenda files, ... and any Org file currently visited by
> Emacs.

But, I've found that's not true, or maybe I'm misunderstanding the
doc.

For a minimal example, put the following in test.org:

> * Headline 1
> :PROPERTIES:
> :ID:       b1569c92-3872-4ab9-80eb-274c4950991e
> :END:

Then:

1. emacs -Q test.org
2. C-x b *scratch*
3. M-: (org-id-find "b1569c92-3872-4ab9-80eb-274c4950991e")

Which returns nil. Also, "C-h v org-id-files" doesn't contain
test.org.

Or maybe the docstring for org-id-extra-files should be rewritten to
say "the current buffer" instead of "any Org file currently visited"?

Also, this seems to be the cause of this bug in org-caldav, which is
how I ran into it:
https://github.com/dengste/org-caldav/issues/230

Would there a recommended mitigation for this on org-caldav's side? I'm
thinking it could call

(org-id-update-id-locations org-caldav-files)

early on, to make sure org-caldav-files ends up in org-id-files.

Tested on following versions:
GNU Emacs 28.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.6, Xaw3d scroll bars) of 2022-07-10
Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/share/emacs/28.1/lisp/org/)
Org mode version 9.5.4 (release_9.5.4-702-g5a49cc @ /home/jack/dev/org-mode/lisp/)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-20 15:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-08-20 15:27           ` Jack Kamm

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).