GNU bug report logs -
#12764
24.2; `quit-window' wrongly iconifies frame
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12764 in the body.
You can then email your comments to 12764 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
rudalics <at> gmx.at, bug-gnu-emacs <at> gnu.org
:
bug#12764
; Package
emacs
.
(Mon, 29 Oct 2012 18:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Romain Francoise <romain <at> orebokech.com>
:
New bug report received and forwarded. Copy sent to
rudalics <at> gmx.at, bug-gnu-emacs <at> gnu.org
.
(Mon, 29 Oct 2012 18:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
There's a regression in Emacs 24 compared to Emacs 23 wrt the behavior
of `quit-window'. In some circumstances, it iconifies frames that were
existing before the current buffer was created, which (AIUI) it's not
supposed to do.
Recipe starting from `emacs -Q':
- C-x 5 2 to create a new frame
- in the new frame, M-x man RET emacs RET
- C-x 0 to make the man buffer the current buffer
- q
When you hit `q' the frame gets iconified, even though it was not
created by M-x man.
Git bisect finds the following commit as the culprit:
| eb54d3ecc6903155955fc07d7f3baaed912c8378 is the first bad commit
| commit eb54d3ecc6903155955fc07d7f3baaed912c8378
| Author: martin rudalics <rudalics <at> gmx.at>
| Date: Tue Oct 4 17:28:25 2011 +0200
|
| Make frame iconification/deletion optional when burying buffers.
|
| * window.el (window--delete): New function.
| (frame-auto-delete): Resuscitate option.
| (bury-buffer, replace-buffer-in-windows)
| (quit-window): Rewrite using window--delete.
| (display-buffer-pop-up-frame, display-buffer-pop-up-window):
| Pass display-buffer-mark-dedicated to window--display-buffer-2
| (Bug#9639).
Adding martin to Cc list.
Thanks,
In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2012-10-29 on silenus
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
Configured using:
`configure '--with-x-toolkit=lucid' '--without-dbus' '--without-gconf'
'--without-gsettings' '--without-selinux' '--without-sound'
'--without-m17n-flt' '--without-gpm' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security'
'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x r e p o r SPC e m <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dynamic-setting
font-render-setting x-toolkit x multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12764
; Package
emacs
.
(Tue, 30 Oct 2012 03:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12764 <at> debbugs.gnu.org (full text, mbox):
Romain Francoise <romain <at> orebokech.com> writes:
> There's a regression in Emacs 24 compared to Emacs 23 wrt the behavior
> of `quit-window'. In some circumstances, it iconifies frames that were
> existing before the current buffer was created, which (AIUI) it's not
> supposed to do.
>
> Recipe starting from `emacs -Q':
> - C-x 5 2 to create a new frame
> - in the new frame, M-x man RET emacs RET
> - C-x 0 to make the man buffer the current buffer
> - q
>
> When you hit `q' the frame gets iconified, even though it was not
> created by M-x man.
I think the attached patch is required to fix this. Martin, please
review, thanks.
=== modified file 'lisp/window.el'
*** lisp/window.el 2012-10-27 08:58:30 +0000
--- lisp/window.el 2012-10-30 03:23:59 +0000
***************
*** 3556,3562 ****
quad entry)
(cond
((and (not prev-buffer)
! (memq (nth 1 quit-restore) '(window frame))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
(window--delete window nil (eq bury-or-kill 'kill)))
--- 3556,3566 ----
quad entry)
(cond
((and (not prev-buffer)
! (or (eq (nth 1 quit-restore) 'frame)
! ;; If the window had been created on an existing frame,
! ;; do not try to delete the frame.
! (and (eq (nth 1 quit-restore) 'window)
! (not (eq (window-deletable-p window) 'frame))))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
(window--delete window nil (eq bury-or-kill 'kill)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12764
; Package
emacs
.
(Tue, 30 Oct 2012 08:44:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 12764 <at> debbugs.gnu.org (full text, mbox):
Chong Yidong <cyd <at> gnu.org> writes:
> I think the attached patch is required to fix this.
Works for me, thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12764
; Package
emacs
.
(Tue, 30 Oct 2012 10:31:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 12764 <at> debbugs.gnu.org (full text, mbox):
>> There's a regression in Emacs 24 compared to Emacs 23 wrt the behavior
>> of `quit-window'. In some circumstances, it iconifies frames that were
>> existing before the current buffer was created, which (AIUI) it's not
>> supposed to do.
>>
>> Recipe starting from `emacs -Q':
>> - C-x 5 2 to create a new frame
>> - in the new frame, M-x man RET emacs RET
>> - C-x 0 to make the man buffer the current buffer
Which means that we now have a single-window frame where that window has
been specially created for showing man. We could intepret the user's
intentions here also as "show me man in a separate, dedicated frame".
>> - q
>>
>> When you hit `q' the frame gets iconified, even though it was not
>> created by M-x man.
>
> I think the attached patch is required to fix this. Martin, please
> review, thanks.
I'm not sure whether the current behavior should be considered incorrect
or a feature. C-x 5 2 usually shows the same buffer as in the previous
frame's selected window. Showing it instead of man doesn't strike me as
something very useful.
OTOH if the user has worked on a different buffer in the new frame and
used C-x 0 in order to temporarily show more of the man page, it makes
sense to show that other buffer again. And if users really wanted to
show man on a separate frame, they could do so immediately.
In any case I'd propose the slightly different patch below.
martin
*** lisp/window.el 2012-10-27 08:58:30 +0000
--- lisp/window.el 2012-10-30 09:51:16 +0000
***************
*** 3556,3562 ****
quad entry)
(cond
((and (not prev-buffer)
! (memq (nth 1 quit-restore) '(window frame))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
(window--delete window nil (eq bury-or-kill 'kill)))
--- 3556,3567 ----
quad entry)
(cond
((and (not prev-buffer)
! (or (eq (nth 1 quit-restore) 'frame)
! (and (eq (nth 1 quit-restore) 'window)
! ;; If the window has been created on an existing
! ;; frame and winds up as the sole window on that
! ;; frame, do not delete it (Bug#12764).
! (not (eq window (frame-root-window window)))))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
(window--delete window nil (eq bury-or-kill 'kill)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12764
; Package
emacs
.
(Wed, 31 Oct 2012 10:30:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 12764 <at> debbugs.gnu.org (full text, mbox):
> *** lisp/window.el 2012-10-27 08:58:30 +0000
> --- lisp/window.el 2012-10-30 09:51:16 +0000
> ***************
> *** 3556,3562 ****
> quad entry)
> (cond
> ((and (not prev-buffer)
> ! (memq (nth 1 quit-restore) '(window frame))
> (eq (nth 3 quit-restore) buffer)
> ;; Delete WINDOW if possible.
> (window--delete window nil (eq bury-or-kill 'kill)))
> --- 3556,3567 ----
> quad entry)
> (cond
> ((and (not prev-buffer)
> ! (or (eq (nth 1 quit-restore) 'frame)
> ! (and (eq (nth 1 quit-restore) 'window)
> ! ;; If the window has been created on an existing
> ! ;; frame and winds up as the sole window on that
> ! ;; frame, do not delete it (Bug#12764).
> ! (not (eq window (frame-root-window window)))))
> (eq (nth 3 quit-restore) buffer)
> ;; Delete WINDOW if possible.
> (window--delete window nil (eq bury-or-kill 'kill)))
Installed now in revision 110748 on trunk. Please check again.
Thanks, martin
Reply sent
to
Chong Yidong <cyd <at> gnu.org>
:
You have taken responsibility.
(Thu, 01 Nov 2012 02:20:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Romain Francoise <romain <at> orebokech.com>
:
bug acknowledged by developer.
(Thu, 01 Nov 2012 02:20:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 12764-done <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
> Installed now in revision 110748 on trunk. Please check again.
Looks and works OK to me. Thank you.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12764
; Package
emacs
.
(Sun, 04 Nov 2012 20:53:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 12764 <at> debbugs.gnu.org (full text, mbox):
Works for me as well, thanks martin!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 03 Dec 2012 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.