help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to search through all buffers?


From: John Russell
Subject: Re: How to search through all buffers?
Date: 05 Apr 2003 01:11:59 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

John Paul Wallington <jpw@gnu.org> writes:

> I misread `occur-read-primary-args'; this is cleaner:
> 
> (defun hanchrow-all-encompassing-occur (regexp &optional hidden-bufs-too)
>   "Show all lines in all visible buffers containing a match for REGEXP.
> With prefix arg HIDDEN-BUFS-TOO, show lines matching in all buffers."
>   (interactive (occur-read-primary-args))
>   (multi-occur (if hidden-bufs-too
>                  (buffer-list)
>                (delq nil
>                      (mapcar (lambda (buf)
>                                (unless (string-match "^ " (buffer-name buf))
>                                  buf))
>                              (buffer-list))))
>              regexp))

Wow, and I had never even heard of occur before.  This function is
great. Thanks. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]