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
0ac05e43ef
commit
195a6afb5f
@ -1896,7 +1896,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