From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Add M-x occur to the menu-bar Date: Tue, 27 Jan 2004 10:34:30 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <4n8yjto16h.fsf@collins.bwh.harvard.edu> References: <3F69E6FF.9050702@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075217999 1315 80.91.224.253 (27 Jan 2004 15:39:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2004 15:39:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jan 27 16:39:54 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlVJi-0006Ox-00 for ; Tue, 27 Jan 2004 16:39:54 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlVJh-0006XO-00 for ; Tue, 27 Jan 2004 16:39:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlVH5-0007lH-MF for emacs-devel@quimby.gnus.org; Tue, 27 Jan 2004 10:37:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AlVGP-0007XE-5t for emacs-devel@gnu.org; Tue, 27 Jan 2004 10:36:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AlVFr-0007OV-L8 for emacs-devel@gnu.org; Tue, 27 Jan 2004 10:36:26 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlVFr-0007OK-95 for emacs-devel@gnu.org; Tue, 27 Jan 2004 10:35:55 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AlVFq-0000OI-00 for ; Tue, 27 Jan 2004 16:35:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlVFp-0000OA-00 for ; Tue, 27 Jan 2004 16:35:53 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AlVFp-0000Be-00 for ; Tue, 27 Jan 2004 16:35:53 +0100 Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v) Cancel-Lock: sha1:WyXld+ikU0irqmWeTASfFS6gJBI= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19510 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19510 On Thu, 18 Sep 2003, ihs_4664@yahoo.com 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