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: martin rudalics <rudalics <at> gmx.at>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 7533 <at> debbugs.gnu.org
Subject: bug#7533: 24.0.50;	`dired-mark-pop-up': delete frame afterwards if `pop-up-frames'
Date: Thu, 02 Dec 2010 20:05:17 +0100
> (save-window-excursion
>   (dired-pop-to-buffer bufname)
>   (apply function args)
>   (if (one-window-p) (delete-frame) (delete-window))) ; <===== NEW

This would be funny when `pop-up-frames' is nil and a window gets reused
for showing the *Deletions* buffer.  In particular if that window is the
only window on its frame ;-)

BTW the `save-window-excursion' is completely useless when you pop up a
new frame.

> The important thing, for me, is that the frame that was created just to
> show the files that will be deleted (or whatever) goes away.  It should
> be only a _temporary_ frame because its only raison d'etre is as part of
> the deletion etc. _dialog_.

Here I have a simple function called `quit-restore-window' which does
exactly that.

> [Martin will explain that a different test from `one-window-p' is more
> appropriate. ;-)  IIRC, he generally prefers something like this to
> (one-window-p win): (eq win (frame-root-window (window-frame win))).]

Because `one-window-p' calls `next-window' which I don't like.  See the
recent discussion about `loop' endlessly cycling over windows.

martin




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.