From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: view mode: `q' does not delete frame
Date: Thu, 1 Dec 2005 17:57:16 -0800 [thread overview]
Message-ID: <MEEKKIABFKKDFJMPIOEBCEMFCNAA.drew.adams@oracle.com> (raw)
In-Reply-To: <uek4wczxg.fsf@gnu.org>
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.
Yes, that's what I ended up doing. I found that option after I filed the
report in September, though. I guess the apropos-zippy behavior is
independent of the previously reported problem.
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.
Yes, I have special-display-regexps's = ("[ ]?[*][^*]+[*]").
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.
I guess that's all this last gripe concerns, then: `apropos-zippy'. I was
thinking this was related to the previous report and, frankly, I had
forgotten that I had found and set view-remove-frame-by-deleting.
I would prefer, of course, that if pop-up-frames = non-nil, the behavior of
view-remove-frame-by-deleting would follow automatically (by default). For
example, instead of having the default value be nil, have it be (not
pop-up-frames).
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?
Sorry about the sarcasm (one person's funny is another person's annoying). I
was frustrated with view-mode, but I didn't mean to harm any humans while
venting against it.
My take on the names:
The functions are all ways of quitting view-mode, so they should all start
with View-quit (or View-exit or ...) - no mixing of synonyms (exit etc.).
None of them should be called just View-quit, as none of them seems to be
the "main" (default) way of quitting, and even if one were, people would
still wonder what it does specifically.
Judging by the doc strings, these names come to mind:
- View-quit-keep-buffer
- View-quit-edit-buffer
- View-quit-kill-buffer
- View-quit-restore-all-buffers
- View-quit-restore-other-buffer (but it's not clear which buffer is
restored).
My main question about the names cannot be addressed for this release: Is it
really necessary to have so many ways to quit? Could this proliferation be a
sign that the design is not as it should be? Why does quitting a mode need
to be so concerned about which context to restore? Perhaps the restoration
context should be passed when the mode is entered? Or perhaps the caller
should control it some other way. And so on. It seems odd to me that a
function is so concerned with how it was called.
Thanks,
Drew
next prev parent reply other threads:[~2005-12-02 1:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-09 3:56 quitting help buffer Drew Adams
2005-09-09 12:50 ` Richard M. Stallman
2005-09-09 16:05 ` Drew Adams
2005-09-10 8:14 ` Richard M. Stallman
2005-12-01 0:44 ` view mode: `q' does not delete frame Drew Adams
2005-12-01 1:16 ` Drew Adams
2005-12-01 20:42 ` Eli Zaretskii
2005-12-02 1:57 ` Drew Adams [this message]
2005-12-03 9:55 ` Eli Zaretskii
2005-12-03 15:08 ` Stefan Monnier
2005-12-03 15:37 ` Drew Adams
2005-12-03 21:35 ` Stefan Monnier
2005-12-03 22:46 ` Drew Adams
2005-12-02 18:21 ` Richard M. Stallman
2005-12-03 12:08 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MEEKKIABFKKDFJMPIOEBCEMFCNAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).