From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Paul Wallington Newsgroups: gmane.emacs.devel Subject: multi-occur-all-buffers suggestion, plus maybe a bug Date: Wed, 15 May 2002 15:00:36 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1021471029 8133 127.0.0.1 (15 May 2002 13:57:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 May 2002 13:57:09 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 177zHB-000274-00 for ; Wed, 15 May 2002 15:57:09 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 177zSi-0005If-00 for ; Wed, 15 May 2002 16:09:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 177zHB-0007w4-00; Wed, 15 May 2002 09:57:09 -0400 Original-Received: from mail3.svr.pol.co.uk ([195.92.193.19]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 177zFz-0007ta-00 for ; Wed, 15 May 2002 09:55:55 -0400 Original-Received: from modem-214.nebraska.dialup.pol.co.uk ([62.137.78.214] helo=bundalo.shootybangbang.com) by mail3.svr.pol.co.uk with esmtp (Exim 3.35 #1) id 177zFy-00006d-00 for emacs-devel@gnu.org; Wed, 15 May 2002 14:55:54 +0100 Original-Received: from jpw by bundalo.shootybangbang.com with local (Exim 3.32 #1 (Debian)) id 177zKW-0004OK-00 for ; Wed, 15 May 2002 15:00:36 +0100 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3966 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3966 Do people think the following function, or something like it, is a good idea ? (defun multi-occur-all-buffers (regexp &optional nlines) "Show all lines in all buffers containing a match for REGEXP. See also `multi-occur'." (interactive (occur-read-primary-args)) (occur-1 regexp nlines (remove (get-buffer "*Occur*") (buffer-list)))) Also, presently C-u M-x occur will error: Wrong type argument: number-or-marker-p, (4) (as will other commands that use `occur-read-primary-args') One way to change this is like so: *** replace.el.orig Wed May 15 14:49:47 2002 --- replace.el Wed May 15 14:51:10 2002 *************** *** 612,618 **** (if (equal input "") default input)) ! current-prefix-arg)) (defun occur (regexp &optional nlines) "Show all lines in the current buffer containing a match for REGEXP. --- 612,619 ---- (if (equal input "") default input)) ! (if current-prefix-arg ! (prefix-numeric-value current-prefix-arg)))) (defun occur (regexp &optional nlines) "Show all lines in the current buffer containing a match for Is that a good way ? -- John Paul Wallington