GNU bug report logs - #48367
28.0.50; quit-restore-buffer may jam

Previous Next

Package: emacs;

Reported by: pillule <pillule <at> riseup.net>

Date: Tue, 11 May 2021 20:27:02 UTC

Severity: normal

Found in version 28.0.50

Done: pillule <pillule <at> riseup.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: pillule <pillule <at> riseup.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#48367: closed (28.0.50; quit-restore-buffer may jam)
Date: Sat, 15 May 2021 10:35:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 15 May 2021 10:34:16 +0000
with message-id <87mtswjngb.fsf <at> host.localdomain>
and subject line Re: bug#48367: 28.0.50; quit-restore-window may jam
has caused the debbugs.gnu.org bug report #48367,
regarding 28.0.50; quit-restore-buffer may jam
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
48367: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48367
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: pillule <pillule <at> riseup.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; quit-restore-buffer may jam
Date: Tue, 11 May 2021 20:26:08 +0000
[Message part 3 (text/plain, inline)]
Hello there,

I think there is a small bug with quit-window / 
quit-restore-window :

with emacs -Q

;; set some rules
(setq display-buffer-alist
     '(("\\*\\(Backtrace\\|Messages\\)\\*"
       (display-buffer-in-side-window)
       (window-height . 0.2)
       (side . bottom))))

;; trigger a logical error to display the *Backtrace* buffer
(> vim emacs)

;; display the *Messages* buffer
(view-echo-area-messages)

;; mess the `quit-restore' window parameter
(kill-buffer (get-buffer "*Backtrace*"))

;; which looks now like that in the *Messages* window :
;; ((quit-restore) (window-slot . 0) (window-side . bottom))

;; try to quit the *Messages* window
(progn (select-window (view-echo-area-messages))
      (quit-window))

;; nothing happens :

The first `cond' of quit-restore-window end up to 't,
it calls (switch-to-prev-buffer window bury-or-kill)
but there is no previous-window available.

The first patch adress this, and a similar one : when there is a previous-buffer available, but it referes to the 
same buffer. (eg: try the recipe again but exchange the role of 
*Messages* and *Backtrace*, you will finish with a blank buffer for backtrace, that you can quit again to end up to the same point)

The second patch is a proposition to clarify a little the code.

[quit-restore-window.patch (text/x-diff, attachment)]
[quit-restore-window2.patch (text/x-diff, attachment)]
[Message part 6 (text/plain, inline)]
--
[Message part 7 (message/rfc822, inline)]
From: pillule <pillule <at> riseup.net>
To: 48367-close <at> debbugs.gnu.org
Cc: pillule <pillule <at> riseup.net>, rudalics <at> gmx.at
Subject: Re: bug#48367: 28.0.50; quit-restore-window may jam
Date: Sat, 15 May 2021 10:34:16 +0000
martin rudalics <rudalics <at> gmx.at> writes:

>> Here an alternative version using subr.el instead :
>
> I've pushed this and the other change now to master in commit
> 0a681590268a4039f95a5a919b6b6d4f4e880d4c, converting your 
> ChangeLog
> exercises to our style.  Please have a look and close this bug 
> if
> everything is alright.

Looks fine to me, thanks.

Looking at https://debbugs.gnu.org/Developer.html how to close 
this bug, I hope it worked.

-- 




This bug report was last modified 4 years and 86 days ago.

Previous Next


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