[Top][All Lists]

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

Re: Add M-x occur to the menu-bar

From: Benjamin Rutt
Subject: Re: Add M-x occur to the menu-bar
Date: Tue, 27 Jan 2004 14:02:23 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

Ted Zlatanov <address@hidden> writes:

> (defun dwim-next ()
>   "Go to the next compile, grep, or occur place.
> The next place is determined by which one of compile, grep, and
> occur has been run most recently."
>   (interactive)
>   (cond 
>    ((equal dwim-next-mode 'occur)
>     ;; act like next-error - is this right?
>     (set-buffer "*Occur*")
>     (occur-next)
>     (occur-mode-goto-occurrence))
>    ;; next-error can handle the rest
>    (t (next-error))))

Looks good, now you just need to accept the same prefix arguments that
next-error and occur-next take, and pass them on.

> I think this would be very nice for Emacs users in general.

I agree, using C-x ` for occur feels very natural.

reply via email to

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