Skip to content

Commit

Permalink
org-id-update-locations: Scan all the open Org buffers
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yantar92 committed Aug 5, 2022
1 parent 215de61 commit 8f5bf17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lisp/org-id.el
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ and TIME is a Lisp time value (HI LO USEC)."
(defun org-id-update-id-locations (&optional files silent)
"Scan relevant files for IDs.
Store the relation between files and corresponding IDs.
This will scan all agenda files, all associated archives, and all
files currently mentioned in `org-id-locations'.
This will scan all agenda files, all associated archives, all open Org
files, and all files currently mentioned in `org-id-locations'.
When FILES is given, scan also these files.
If SILENT is non-nil, messages are suppressed."
(interactive)
Expand All @@ -515,6 +515,8 @@ If SILENT is non-nil, messages are suppressed."
org-id-extra-files)
;; All files known to have IDs.
org-id-files
;; All Org files open in Emacs.
(mapcar #'buffer-file-name (org-buffer-list 'files t))
;; Additional files from function call.
files)))))
(nfiles (length files))
Expand Down

0 comments on commit 8f5bf17

Please sign in to comment.