Widen buffers for multi-occur

Bernt Hansen writes:

> The org-agenda multi-occur search command (C-c a /) does not return
> results on buffers that are currently narrowed if the search would
> normally match outside the narrowed region.  This prevents possible
> matches from being displayed.
This commit is contained in:
Carsten Dominik 2009-11-19 14:25:02 +01:00
parent 2d511abb73
commit 9bc97e6f16
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-11-19 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-occur-in-agenda-files): Make sure none of the
buffers is narrowed.
* org-habit.el (org-is-habit-p): Add doc string.
2009-11-18 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -16663,7 +16663,12 @@ really on, so that the block visually is on the match."
(add-to-list 'files f 'append)
(add-to-list 'tnames (file-truename f) 'append)))
(multi-occur
(mapcar (lambda (x) (or (get-file-buffer x) (find-file-noselect x))) files)
(mapcar (lambda (x)
(with-current-buffer
(or (get-file-buffer x) (find-file-noselect x))
(widen)
(current-buffer)))
files)
regexp)))
(if (boundp 'occur-mode-find-occurrence-hook)