GNU bug report logs - #7533
24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Thu, 2 Dec 2010 18:32:01 UTC

Severity: minor

Found in version 24.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'martin rudalics'" <rudalics <at> gmx.at>
Cc: 7533 <at> debbugs.gnu.org
Subject: bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' [PATCH]
Date: Sat, 26 May 2012 10:55:42 -0700
[Message part 1 (text/plain, inline)]
Martin wrote:

> IIUC your patch works regardless of the value of
> `frame-auto-hide-function'.  The problem of your patch is that in
>    (if (one-window-p) (delete-frame) (delete-window))
> the window for showing the buffer may have been _reused_ in which case
> deleting is certainly the wrong solution.

I do not understand how/why that window would or should be reused.

Especially between the time it becomes displayed and the end of the calling
function.  The window is only for the user interaction of confirming (or not)
the operation on the marked files.

The existing code seems to reflect this aim in that it uses
`save-window-excursion'.  What is still missing is (a) deletion of the window or
frame (if `one-window-p') and (b) burial of the buffer.  And this should happen
always, regardless of what the user does, including `C-g'.

If the buffer is not shown in a separate frame then the `save-window-excursion'
alone seems to remove/hide the window - great.  And that is why more people are
not complaining about this regression, IMO.

But if the buffer is shown in a separate frame (e.g. due to
`special-buffer-regexps') then `save-window-excursion' is simply not sufficient.
The frame remains displayed after the user interaction, regardless of what the
user does during the interaction (including `C-g').

Attached is a patch against the latest source code.  AFAIK it DTRT.  Can anyone
point to a reasonable situation where it does not DTRT - IOW, where what it does
is inappropriate?  If not, can this please be installed for Emacs 24.1, to
eliminate this regression?  Thx.

Here is a change-log entry for the patch:

2012-05-26  Drew Adams  <drew.adams <at> oracle.com>

	* dired.el (dired-mark-pop-up):
	Delete the marked-files window/frame and bury its buffer.
[dired-2012-05-26.patch (application/octet-stream, attachment)]

This bug report was last modified 12 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.