From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: FW: Minibuf menu when minibuffer is standalone Date: Thu, 13 Mar 2008 04:01:19 +0200 Organization: JURTA Message-ID: <87lk4n5teo.fsf@jurta.org> References: <001001c883ab$528a70f0$0600a8c0@us.oracle.com> <47D6FC28.2090306@gmail.com> <47D70221.40309@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205378940 6817 80.91.229.12 (13 Mar 2008 03:29:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2008 03:29:00 +0000 (UTC) Cc: "Lennart Borgman \(gmail\)" , Drew Adams , 'Emacs-Devel' To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 13 04:29:28 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JZe8F-0005z0-Bs for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2008 04:29:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZe7g-0008Ku-5Z for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2008 23:28:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZe7c-0008KS-9J for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZe7a-0008KC-MZ for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZe7a-0008K8-JO for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:46 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZe7a-0000a6-4w for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:46 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JZe7X-000M5i-TO; Thu, 13 Mar 2008 05:28:44 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 11 Mar 2008 21:11:40 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: 9f090f397804869cf00fade203417d62 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2396 [Mar 12 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 11 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92359 Archived-At: > In any case I've changed the Quit to use the same binding as C-g (so > C-g is shown in the shortcuts) and tweaked the "Enter" entry so it shows > RET (or thing) rather than C-j (or nothing). BTW, a similar thing could be done to the toolbar. The "kill" icon on the toolbar kills the current buffer, but it is greyed out when the minibuffer is active. However, it is natural from the user's point of view to expect that clicking on this icon will "kill" the minibuffer when it is active. Internally, killing the normal buffer and the minibuffer is implemented by separate functions, but for the user of the toolbar this distinction is not essential. I propose the following patch that enables the kill icon in the minibuffer and calls `abort-recursive-edit' when clicked on. This makes more conventient for mouse users to get out of the minibuffer. Index: lisp/menu-bar.el =================================================================== RCS file: /sources/emacs/emacs/lisp/menu-bar.el,v retrieving revision 1.323 diff -c -r1.323 menu-bar.el *** lisp/menu-bar.el 11 Mar 2008 22:02:46 -0000 1.323 --- lisp/menu-bar.el 13 Mar 2008 02:00:19 -0000 *************** *** 1439,1447 **** (not (window-minibuffer-p (frame-selected-window menu-frame))))) (defun kill-this-buffer () ; for the menu bar ! "Kill the current buffer." (interactive) ! (kill-buffer (current-buffer))) (defun kill-this-buffer-enabled-p () (let ((count 0) --- 1439,1451 ---- (not (window-minibuffer-p (frame-selected-window menu-frame))))) (defun kill-this-buffer () ; for the menu bar ! "Kill the current buffer. ! When called in the minibuffer, get out of the minibuffer ! using `abort-recursive-edit'." (interactive) ! (if (menu-bar-non-minibuffer-window-p) ! (kill-buffer (current-buffer)) ! (abort-recursive-edit))) (defun kill-this-buffer-enabled-p () (let ((count 0) *************** *** 1450,1457 **** (or (string-match "^ " (buffer-name (car buffers))) (setq count (1+ count))) (setq buffers (cdr buffers))) ! (and (menu-bar-non-minibuffer-window-p) ! (> count 1)))) (put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p)) --- 1454,1461 ---- (or (string-match "^ " (buffer-name (car buffers))) (setq count (1+ count))) (setq buffers (cdr buffers))) ! (or (not (menu-bar-non-minibuffer-window-p)) ! (> count 1)))) (put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p)) -- Juri Linkov http://www.jurta.org/emacs/