Make sure there are no duplicates in location candidates

This commit is contained in:
Daniel Borchmann 2025-08-19 19:38:11 +02:00
parent e50bae5c6b
commit 1f30ab8590
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

View File

@ -1918,11 +1918,13 @@ the variables `org-agenda-files',
org-agenda-files)))
(scope (cond (use-all-org-files
(append (unless current-buffer-is-in-org-agenda-files? ; avoid duplicate entries
(list (buffer-file-name default-buffer)))
(org-agenda-files)
(cl-remove-if-not #'stringp
org-agenda-text-search-extra-files)))
(->> (append (unless current-buffer-is-in-org-agenda-files? ; avoid duplicate entries
(list (buffer-file-name default-buffer)))
(org-agenda-files)
(cl-remove-if-not #'stringp
org-agenda-text-search-extra-files))
(-map #'file-truename)
(-uniq)))
(current-buffer-is-in-org-agenda-files?
(org-agenda-files))
(t