all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* multi-occur-all-buffers suggestion, plus maybe a bug
@ 2002-05-15 14:00 John Paul Wallington
  2002-05-15 19:35 ` Colin Walters
  0 siblings, 1 reply; 2+ messages in thread
From: John Paul Wallington @ 2002-05-15 14:00 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: multi-occur-all-buffers suggestion, plus maybe a bug
  2002-05-15 14:00 multi-occur-all-buffers suggestion, plus maybe a bug John Paul Wallington
@ 2002-05-15 19:35 ` Colin Walters
  0 siblings, 0 replies; 2+ messages in thread
From: Colin Walters @ 2002-05-15 19:35 UTC (permalink / raw)


On Wed, 2002-05-15 at 10:00, John Paul Wallington wrote:

> Also, presently C-u M-x occur will error:
> Wrong type argument: number-or-marker-p, (4)

Definitely a bug.  I've applied your patch.  Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-15 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-15 14:00 multi-occur-all-buffers suggestion, plus maybe a bug John Paul Wallington
2002-05-15 19:35 ` Colin Walters

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.