Avoid duplicate entries in Org location queries
This happens when the current buffer is already part of the Org agenda files. In this case, we do not add the default buffer to the list of search files.
This commit is contained in:
parent
e60dee0a13
commit
7f512bed15
@ -1898,7 +1898,8 @@ linking to any item."
|
|||||||
org-agenda-files)))
|
org-agenda-files)))
|
||||||
|
|
||||||
(scope (cond (use-all-org-files
|
(scope (cond (use-all-org-files
|
||||||
(append (list (buffer-file-name default-buffer))
|
(append (unless current-buffer-is-in-org-agenda-files? ; avoid duplicate entries
|
||||||
|
(list (buffer-file-name default-buffer)))
|
||||||
(org-agenda-files)
|
(org-agenda-files)
|
||||||
(cl-remove-if-not #'stringp
|
(cl-remove-if-not #'stringp
|
||||||
org-agenda-text-search-extra-files)))
|
org-agenda-text-search-extra-files)))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user