From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: view mode: `q' does not delete frame Date: Thu, 01 Dec 2005 22:42:03 +0200 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1133472441 2413 80.91.229.2 (1 Dec 2005 21:27:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Dec 2005 21:27:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 01 22:27:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhvtE-00077m-Bm for ged-emacs-devel@m.gmane.org; Thu, 01 Dec 2005 22:22:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ehvt9-0001jH-S6 for ged-emacs-devel@m.gmane.org; Thu, 01 Dec 2005 16:22:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ehvqe-00014n-IG for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:20:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhvqU-00011o-1v for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:20:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhvqT-00011j-Ki for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:20:01 -0500 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1EhvqT-00070N-2U for emacs-devel@gnu.org; Thu, 01 Dec 2005 16:20:01 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by mx20.gnu.org with esmtp (Exim 4.34) id 1EhvFq-00061F-GN for emacs-devel@gnu.org; Thu, 01 Dec 2005 15:42:10 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-200-27.inter.net.il [80.230.200.27]) by romy.inter.net.il (MOS 3.7.2-GA) with ESMTP id DCF72076 (AUTH halo1); Thu, 1 Dec 2005 22:42:04 +0200 (IST) Original-To: "Drew Adams" In-reply-to: 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:46857 Archived-At: > From: "Drew Adams" > Date: Wed, 30 Nov 2005 16:44:21 -0800 > > See emacs-devel list messages of 9/8 and 9/9/2005, subject "quitting > help buffer". RMS's conclusion was "It doesn't fail for me, so there's > nothing I can do." By that he meant that for him `q' always deleted > the frame. Richard, is this indeed so? does `q' on your system indeed delete the frame that shows the *Apropos Zippy* buffer, in "emacs -Q", and without any customizations except setting pop-up-frames? After reading the code (see below), I'm surprised that things could work for you as Drew expects them to. > emacs -q > > M-x set-variable RET pop-up-frames t > > M-x apropos-zippy RET wash RET > > Try `q' in the frame *Apropos Zippy*. It does nothing. I want it to > delete the frame. I looked into this and found a small mess. First, view-mode is only supposed to delete the frame if you set view-remove-frame-by-deleting to a non-nil value; otherwise it iconifies the frame. Did you set that variable? if not, View Mode is not supposed to do what you want. But don't rush to set it just yet, `cause that's just the tip of an iceberg. The apropos and help commands don't invoke the full view-mode as it was supposed to be, via view-mode-enter; instead, they call view-mode directly, and arrange for what happens when you type `q' in the function `print-help-return-message'. That function sets the variable help-return-method, but it doesn't support pop-up-frames, only pop-up-windows, special-display-buffer-names and special-display-regexps. If I use one of the special-display-* variables to include *Help* and *Apropos* buffers in the respective lists, the frames that show those buffers are deleted when I press `q'. I'm guessing that you didn't set special-display-* variables to include any of the buffers mentioned in this thread. But even setting special-display-* doesn't work for `apropos-zippy', since it fails to call `print-help-return-message', like the other help commands do, and thus help return method is left at its default. This is a bug in yow.el, I think. So, unless someone finds where I'm wrong in my conclusions, I think we should modify `print-help-return-message' to support pop-up-frames, and add a call to `print-help-return-message' in `apropos-zippy'. Any objections or further insights, anyone? Finally, I'd like to respond to your gripes (expressed in some quite strong language, too strong if you ask me) in your original message back in September about the names of the View-* functions that exit the view mode in various ways. I do agree that some of the names are not descriptive enough, so I suggest the following changes in those names: View-quit -> View-quit (no change) View-quit-all -> View-quit-restore-all-windows View-exit -> View-exit-view-mode View-exit-and-edit -> View-edit View-leave -> View-quit-keep-current-buffer View-kill-and-leave -> View-quit-kill-current-buffer WDYT?