Skip to content

Commit 8f5bf17

Browse files
committed
org-id-update-locations: Scan all the open Org buffers
* lisp/org-id.el (org-id-update-id-locations): Always scan all the open Org file buffers for IDs. Fixes https://orgmode.org/list/87r11zifjy.fsf@gmail.com
1 parent 215de61 commit 8f5bf17

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lisp/org-id.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ and TIME is a Lisp time value (HI LO USEC)."
491491
(defun org-id-update-id-locations (&optional files silent)
492492
"Scan relevant files for IDs.
493493
Store the relation between files and corresponding IDs.
494-
This will scan all agenda files, all associated archives, and all
495-
files currently mentioned in `org-id-locations'.
494+
This will scan all agenda files, all associated archives, all open Org
495+
files, and all files currently mentioned in `org-id-locations'.
496496
When FILES is given, scan also these files.
497497
If SILENT is non-nil, messages are suppressed."
498498
(interactive)
@@ -515,6 +515,8 @@ If SILENT is non-nil, messages are suppressed."
515515
org-id-extra-files)
516516
;; All files known to have IDs.
517517
org-id-files
518+
;; All Org files open in Emacs.
519+
(mapcar #'buffer-file-name (org-buffer-list 'files t))
518520
;; Additional files from function call.
519521
files)))))
520522
(nfiles (length files))

0 commit comments

Comments
 (0)