From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: Add M-x occur to the menu-bar Date: Thu, 18 Sep 2003 11:10:23 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3F69E6FF.9050702@yahoo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1063905147 14163 80.91.224.253 (18 Sep 2003 17:12:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2003 17:12:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Sep 18 19:12:24 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A02KO-00065D-00 for ; Thu, 18 Sep 2003 19:12:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A02OT-0007uo-00 for ; Thu, 18 Sep 2003 19:16:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A02Jk-0002jo-0k for emacs-devel@quimby.gnus.org; Thu, 18 Sep 2003 13:11:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A02IY-0002Vv-02 for emacs-devel@gnu.org; Thu, 18 Sep 2003 13:10:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A02IV-0002U9-JH for emacs-devel@gnu.org; Thu, 18 Sep 2003 13:10:28 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A02IQ-0002Q3-Po for emacs-devel@gnu.org; Thu, 18 Sep 2003 13:10:22 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A02I1-00029d-00 for ; Thu, 18 Sep 2003 19:09:57 +0200 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 1A02I1-00029V-00 for ; Thu, 18 Sep 2003 19:09:57 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A02IJ-0003cU-00 for ; Thu, 18 Sep 2003 19:10:15 +0200 Original-Lines: 36 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us 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:16466 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16466 Marshall, Simon wrote: > I think M-x grep and M-x occur should have as similar a UI as possible. I'm not sure I agree: grep is for searching many files (external to Emacs) and occur is for searching a single buffer (internal to Emacs). > I've always found it baffling that if you are in a *grep* buffer you get > a Compile menu with entries like "Next Error" to go to the next match. > I've always found it annoying that C-x ` works for *grep* but not for > *Occur*. (I guess M-x grep is closer to M-x compile for historical > implementation reasons.) 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 Rodgers