unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: 7533@debbugs.gnu.org
Subject: bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames'
Date: Fri, 03 Dec 2010 09:17:54 +0100	[thread overview]
Message-ID: <4CF8A7B2.5080306@gmx.at> (raw)
In-Reply-To: <44FB8E26FD824BB18AE8A367F560C091@us.oracle.com>

 > Agreed.  But what's the right test?  It is _not_ `pop-up-frames' non-nil,
 > because users can do other things than that to cause a new frame to be created
 > for this dialog.  What's needed is a test of whether a frame was newly created
 > for this dialog buffer.  What's the code for that test?

In the past, routines usually tested the settings of variables like
`pop-up-windows' or `pop-up-frames' to guess the expected behavior of
`display-buffer'.  In most cases the guesses were correct.  In a few
corner cases they failed and the example you cite above is one of them.

Here I have two things: A window parameter that tells for each window
whether the current buffer is the first buffer shown in it and a
separate global variable which gives some rudimentary information about
what the last `display-buffer' invocation did to find a suitable window.
The former exists independently of `display-buffer' so it also works for
a "manually" constructed or reused window or frame.  The latter is
`display-buffer' specific and is mainly used for providing some feedback
about the change of the entire window configuration.

 >> BTW the `save-window-excursion' is completely useless when
 >> you pop up a new frame.
 >
 > Yes, I know.  It was already there, and I left it.  It seems benign in this case
 > AFAICT, but feel free to fix this as it really should be fixed.

`save-window-excursion' is hardly ever benign.  Whenever you find a
`display-buffer' wrapped in a `save-window-excursion' you can be 100%
sure that the code fails with popped up frames.

 > The bug report is about the annoyance of not deleting a new frame that was
 > created (using whatever mechanism, including non-nil `pop-up-frames') for dialog
 > purposes.  When the dialog is finished, such a new frame should disappear.
 > Users should not need to manually delete it.

There's no formal definition of "dialog purpose" in Emacs and it's not
easy to do that in general.  The major problem to address is whether and
how such a dialog can be disrupted by other activities and how to resume
it at a later time.

martin





  reply	other threads:[~2010-12-03  8:17 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 18:35 bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' Drew Adams
2010-12-02 19:05 ` martin rudalics
2010-12-02 19:22   ` Drew Adams
2010-12-03  8:17     ` martin rudalics [this message]
2010-12-03 16:22       ` Drew Adams
2010-12-03 18:16         ` martin rudalics
2010-12-03 18:33           ` Drew Adams
2010-12-03 18:41             ` martin rudalics
2010-12-04 22:44               ` Chong Yidong
2010-12-16 18:27                 ` Drew Adams
2010-12-17  6:32                   ` martin rudalics
2010-12-17 15:32                     ` Drew Adams
2010-12-17 16:12                       ` martin rudalics
2010-12-17 16:55                         ` Drew Adams
2010-12-17 18:09                           ` martin rudalics
2010-12-17 18:40                             ` Drew Adams
2010-12-21  6:48                           ` Chong Yidong
2010-12-03 20:27       ` Stefan Monnier
2012-04-05 20:23         ` Drew Adams
2012-04-06 14:02           ` martin rudalics
2012-04-06 14:44             ` Drew Adams
2012-04-06 14:53               ` martin rudalics
2012-04-06 15:34                 ` Drew Adams
2012-04-06 15:47                   ` martin rudalics
2012-04-06 16:10                     ` Drew Adams
2012-04-06 16:56                       ` martin rudalics
2012-04-06 17:08                         ` Drew Adams
2012-04-18 14:32                           ` Drew Adams
2012-05-25 20:52                             ` Drew Adams
2012-05-26 17:55                               ` bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' [PATCH] Drew Adams
2012-05-27 13:21                                 ` martin rudalics
2012-05-27 14:33                                   ` Drew Adams
2011-01-18 22:14 ` bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' Drew Adams
2012-09-05 14:30 ` martin rudalics
2012-09-05 14:33   ` Drew Adams
2012-10-03  9:11     ` martin rudalics
2012-10-03 15:52     ` Drew Adams

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=4CF8A7B2.5080306@gmx.at \
    --to=rudalics@gmx.at \
    --cc=7533@debbugs.gnu.org \
    --cc=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).