emacs-devel
[Top][All Lists]
Advanced

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

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


From: Ted Zlatanov
Subject: Re: Add M-x occur to the menu-bar
Date: Tue, 27 Jan 2004 10:34:30 -0500
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v)

On Thu, 18 Sep 2003, address@hidden wrote:

> Not that C-x ` works in all buffers, not just the *grep* buffer.
> Making *Occur* buffers just like *grep* and *compilation* buffers
> would be a lot of work, but if you just want C-x ` to "do the right
> thing" in *Occur* buffers, try this patch:
> 
> *** emacs-21.3/lisp/replace.el.orig   Fri Oct 18 19:21:09 2002
> --- emacs-21.3/lisp/replace.el        Thu Sep 18 10:51:12 2003
> ***************
> *** 421,426 ****
> --- 421,427 ----
>        (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence)
>        (define-key map "\C-m" 'occur-mode-goto-occurrence)
>        (define-key map "\M-n" 'occur-next)
> +     (define-key map "\C-x`" 'occur-next) ; override global binding
>        (define-key map "\M-p" 'occur-prev)
>        (define-key map "g" 'revert-buffer)
>        map)

Kevin,

I like your patch, but would it be possible to have an intelligent
dwim-next that did the right thing in Emacs?  It would look for
*compilation* then *grep* then *occur*, and depending on which one it
found it could call the appropriate "next" function (maybe the order
would be customizable too).

Ditto for "prev", handled by dwim-prev.

I can write this code, including the customization definition for the
order.  I was just wondering if something similar already existed and
if anyone else would find it useful; also the right namespace of the
function is not clear to me.

Thanks
Ted





reply via email to

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