From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.devel Subject: Re: Add M-x occur to the menu-bar Date: Tue, 27 Jan 2004 14:02:23 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <3F69E6FF.9050702@yahoo.com> <4n8yjto16h.fsf@collins.bwh.harvard.edu> <4nd695kz62.fsf@collins.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075230470 1512 80.91.224.253 (27 Jan 2004 19:07:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2004 19:07:50 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jan 27 20:07:38 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 1AlYYk-0006VZ-00 for ; Tue, 27 Jan 2004 20:07:38 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlYYj-0002Yo-00 for ; Tue, 27 Jan 2004 20:07:38 +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 1AlYXk-0005jz-CB for emacs-devel@quimby.gnus.org; Tue, 27 Jan 2004 14:06:36 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AlYUT-00040j-5J for emacs-devel@gnu.org; Tue, 27 Jan 2004 14:03:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AlYTo-0003QS-JO for emacs-devel@gnu.org; Tue, 27 Jan 2004 14:03:03 -0500 Original-Received: from [164.107.123.5] (helo=cis.ohio-state.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlYTi-0003GF-GW for emacs-devel@gnu.org; Tue, 27 Jan 2004 14:02:26 -0500 Original-Received: from mu.cis.ohio-state.edu (daemon@mu.cis.ohio-state.edu [164.107.112.41]) by cis.ohio-state.edu (8.11.6p2-20030924/8.11.6) with ESMTP id i0RJ2NP07073; Tue, 27 Jan 2004 14:02:23 -0500 (EST) Original-Received: (from rutt@localhost) by mu.cis.ohio-state.edu (8.11.6p2-20030924/8.11.6) id i0RJ2N604892; Tue, 27 Jan 2004 14:02:23 -0500 (EST) X-Authentication-Warning: mu.cis.ohio-state.edu: rutt set sender to rutt.4@osu.edu using -f Original-To: Ted Zlatanov Mail-Followup-To: Ted Zlatanov , emacs-devel@gnu.org In-Reply-To: <4nd695kz62.fsf@collins.bwh.harvard.edu> (Ted Zlatanov's message of "Tue, 27 Jan 2004 13:46:13 -0500") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) 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:19517 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19517 Ted Zlatanov 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. -- Benjamin