Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-09-07 15:55:20 +02:00
commit 9c5d03ca3b
1 changed files with 21 additions and 10 deletions

View File

@ -4381,8 +4381,9 @@ as a whole, to include whitespace.
with a colon, this will mean that the (non-regexp) snippets of the
Boolean search must match as full words.
This command searches the agenda files, and in addition the files listed
in `org-agenda-text-search-extra-files'."
This command searches the agenda files, and in addition the files
listed in `org-agenda-text-search-extra-files' unless a restriction lock
is active."
(interactive "P")
(if org-agenda-overriding-arguments
(setq todo-only (car org-agenda-overriding-arguments)
@ -4492,10 +4493,20 @@ in `org-agenda-text-search-extra-files'."
(if hdl-only (setq regexp (concat org-outline-regexp-bol ".*?"
regexp))))
(setq files (org-agenda-files nil 'ifmode))
;; Add `org-agenda-text-search-extra-files' unless there is some
;; restriction.
(unless (get 'org-agenda-files 'org-restrict)
(when (eq (car org-agenda-text-search-extra-files) 'agenda-archives)
(pop org-agenda-text-search-extra-files)
(setq files (org-add-archive-files files)))
(setq files (append files org-agenda-text-search-extra-files)
(setq files (org-add-archive-files files))))
;; Uniquify files. However, let `org-check-agenda-file' handle
;; non-existent ones.
(setq files (cl-remove-duplicates
(append files org-agenda-text-search-extra-files)
(lambda (a b)
(and (file-exists-p a)
(file-exists-p b)
(file-equal-p a b))))
rtnall nil)
(while (setq file (pop files))
(setq ee nil)