GNU bug report logs - #38677
26.3; `display-buffer-reuse-mode-window' doesn't check for derived modes

Previous Next

Package: emacs;

Reported by: Trevor Murphy <trevormurphy <at> google.com>

Date: Thu, 19 Dec 2019 20:42:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 26.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38677 in the body.
You can then email your comments to 38677 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38677; Package emacs. (Thu, 19 Dec 2019 20:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Trevor Murphy <trevormurphy <at> google.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 19 Dec 2019 20:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Trevor Murphy <trevormurphy <at> google.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3;
 `display-buffer-reuse-mode-window' doesn't check for derived modes
Date: Thu, 19 Dec 2019 12:37:40 -0800
The problem is in the middle of the function:

        (let ((mode?
               (with-current-buffer (window-buffer window)
                 (cond ((memq major-mode allowed-modes)
                        'same)
                       ((derived-mode-p allowed-modes) ; <= this line
                        'derived)))))
                        ...)

`allowed-modes' is always a list at this point, but `derived-mode-p'
expects each mode as a separated argument (it takes them with an &rest
parameter).  So this call always fails.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38677; Package emacs. (Fri, 20 Dec 2019 04:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 38677 <at> debbugs.gnu.org (full text, mbox):

From: Trevor Murphy <trevormurphy <at> google.com>
To: 38677 <at> debbugs.gnu.org
Subject: [PATCH] Fix bug in `display-buffer-reuse-mode-window'. (bug#38677)
Date: Thu, 19 Dec 2019 18:28:12 -0800
Sorry about the delay getting this out, I can never remember how to
use git send-email.

---
 lisp/window.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/window.el b/lisp/window.el
index a0280eba9b..96a22db885 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7619,7 +7619,7 @@ indirectly called by the latter."
                (with-current-buffer (window-buffer window)
                  (cond ((memq major-mode allowed-modes)
                         'same)
-                       ((derived-mode-p allowed-modes)
+                       ((apply #'derived-mode-p allowed-modes)
                         'derived)))))
           (when (and mode?
                      (not (and inhibit-same-window-p
-- 
2.24.1.735.g03f4e72817-goog




Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 25 Aug 2020 22:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38677; Package emacs. (Thu, 01 Oct 2020 22:32:01 GMT) Full text and rfc822 format available.

Message #13 received at 38677 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Trevor Murphy <trevormurphy <at> google.com>
Cc: 38677 <at> debbugs.gnu.org
Subject: Re: bug#38677: [PATCH] Fix bug in
 `display-buffer-reuse-mode-window'. (bug#38677)
Date: Fri, 02 Oct 2020 00:31:11 +0200
Trevor Murphy <trevormurphy <at> google.com> writes:

> -                       ((derived-mode-p allowed-modes)
> +                       ((apply #'derived-mode-p allowed-modes)

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 01 Oct 2020 22:32:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 38677 <at> debbugs.gnu.org and Trevor Murphy <trevormurphy <at> google.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 01 Oct 2020 22:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 30 Oct 2020 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 177 days ago.

Previous Next


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