From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Russell Newsgroups: gmane.emacs.help Subject: Re: How to search through all buffers? Date: 05 Apr 2003 01:11:59 -0500 Organization: Cisco Systems Inc. Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87r88hy8mr.fsf@blarg.net> <87adf5wpks.fsf@indigo.shootybangbang.com> <874r5dwo1u.fsf@indigo.shootybangbang.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049523444 14603 80.91.224.249 (5 Apr 2003 06:17:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2003 06:17:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 05 08:17:22 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 191gzS-0003nP-00 for ; Sat, 05 Apr 2003 08:17:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191gxa-0006Lo-09 for gnu-help-gnu-emacs@m.gmane.org; Sat, 05 Apr 2003 01:15:26 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Cache-Post-Path: sj-nntpcache-5!unknown@161.44.79.244 X-Cache: nntpcache 2.4.0b2 (see http://www.nntpcache.org/) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 19 Original-Xref: shelby.stanford.edu gnu.emacs.help:111683 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8185 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8185 John Paul Wallington 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.