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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Trevor Murphy <trevormurphy@HIDDEN>; Keywords: patch fixed; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.1, send any further explanations to 38677 <at> debbugs.gnu.org and Trevor Murphy <trevormurphy@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 38677 <at> debbugs.gnu.org:


Received: (at 38677) by debbugs.gnu.org; 1 Oct 2020 22:31:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 01 18:31:27 2020
Received: from localhost ([127.0.0.1]:38674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kO76k-0007a1-Qh
	for submit <at> debbugs.gnu.org; Thu, 01 Oct 2020 18:31:26 -0400
Received: from quimby.gnus.org ([95.216.78.240]:36252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kO76h-0007Zk-VN
 for 38677 <at> debbugs.gnu.org; Thu, 01 Oct 2020 18:31:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=fCkGzQmUQkURWAEkSB1aHhfuxJLbwVfflS4KdhhMazM=; b=L81CEE4cmn2FbTk21Kc7mraNkx
 A8C/sad8Ecrl6sWBBaL44MpEEPf0sGJ5BzqepqMNDrdzxunO6E4AR0ZuVoF974itDOVSm0/LQcTEV
 1ITUe0DMKWDapcWYi/FApXOmpJa5k96s9BzTjidFVnPNJ/F0m+gTng1lSu2WxW3qAX5M=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kO76X-0004C5-4v; Fri, 02 Oct 2020 00:31:17 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Trevor Murphy <trevormurphy@HIDDEN>
Subject: Re: bug#38677: [PATCH] Fix bug in
 `display-buffer-reuse-mode-window'. (bug#38677)
References: <mt65pngkoxuz.fsf@HIDDEN>
 <CAKpE4gmKM0RE5O8WtnY7nRcRkDU_O9Z292M0F-0f339okWMzvw@HIDDEN>
X-Now-Playing: Hood's _The Negatives_: "The Negatives"
Date: Fri, 02 Oct 2020 00:31:11 +0200
In-Reply-To: <CAKpE4gmKM0RE5O8WtnY7nRcRkDU_O9Z292M0F-0f339okWMzvw@HIDDEN>
 (Trevor Murphy's message of "Thu, 19 Dec 2019 18:28:12 -0800")
Message-ID: <87tuvdy3ww.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Trevor Murphy <trevormurphy@HIDDEN> writes: > -
 ((derived-mode-p
 allowed-modes) > + ((apply #'derived-mode-p allowed-modes) Thanks; applied
 to Emacs 28. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38677
Cc: 38677 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Trevor Murphy <trevormurphy@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38677; Package emacs. Full text available.
Added tag(s) patch. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 38677 <at> debbugs.gnu.org:


Received: (at 38677) by debbugs.gnu.org; 20 Dec 2019 04:01:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 19 23:01:38 2019
Received: from localhost ([127.0.0.1]:45833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ii9Tu-0005f7-E8
	for submit <at> debbugs.gnu.org; Thu, 19 Dec 2019 23:01:38 -0500
Received: from mail-vs1-f42.google.com ([209.85.217.42]:39616)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <trevormurphy@HIDDEN>) id 1ii81l-0003NA-B5
 for 38677 <at> debbugs.gnu.org; Thu, 19 Dec 2019 21:28:29 -0500
Received: by mail-vs1-f42.google.com with SMTP id p21so5114763vsq.6
 for <38677 <at> debbugs.gnu.org>; Thu, 19 Dec 2019 18:28:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=kVM/SK7wATeCtrQfGQWUHwJcjSD9H7rihR+7THwvvjg=;
 b=UfovAogWpED6VinT6Yll6j5HqtopsvaNM/Rva0lgC8mBzYoyEQIEM62jO8A4j2vEow
 EM6ohtnLC2pNMPhDxcsIcweL7UIciSGMj4HwKOxt607se3lcnw40/PplIDHuTZ85TWt2
 dAGZfh9gWTZqWNs2PTPybQMyya2dCKF7Zp8rGR9gZaDXM+wubQ277bvgdqhNMdT6rtNa
 eG4olgyv2AEbOvAc0GoZqRX10InGwGWSZo6cbMA+vyHK4IWYLe4vhQKyzWrt/aFygiw2
 AHRPWLeabgPwSg28qPxwFA1iGOjcuTchWpj0bGFE34I6+mD9+9legAq5vcS8Sfje4Jst
 ZLUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=kVM/SK7wATeCtrQfGQWUHwJcjSD9H7rihR+7THwvvjg=;
 b=kIF0WLaczdISgo0h3jxVA+EgOoZZ0PqU0sxU5+fSlInzn7WFZvBWKY14CmqTM/Wc0w
 ECWJP9dul9RIbqCf1jFLKNlfTpgYt6WB7wbQbY6U0FQgixUil++fDPwIy7pQ+Dw9wpMr
 okg8CFgE++WN6yDyQQ2qS0JXu1D4MzPeKSUkMTRM1CafKGy8zzk8/SDi0Umw6SKNBIGm
 cUJfwRb+StqtjXcYdp+1AmaBvo9ctF+LA9/kb1ddY8bxyMuyIb3rgKPQ71hTOaP7qX1a
 AOBF36H52EMX6xXhF5/gBcP3ZWchbjCd4XSadq91pI3oTd8cS8s24mPHag4cmOdbnJmh
 IVKg==
X-Gm-Message-State: APjAAAVoy1XEIJ11o23O1AUaXpqKLtBKz2lL59O6XepmrW94bbpz+btD
 TZT4P2sIrbQqDwMw4i7YjX6snQrBQqs7ocVESIqg/Z8rMDY=
X-Google-Smtp-Source: APXvYqwT4oHp8rqoxHeoyodE/+dZZmCqjVqyWXBcezEFsyKVP2kBGW8xkSZfrQkjirZ0ADZedZeY+/kR1XCR53w9A7s=
X-Received: by 2002:a05:6102:485:: with SMTP id
 n5mr6824927vsa.149.1576808903234; 
 Thu, 19 Dec 2019 18:28:23 -0800 (PST)
MIME-Version: 1.0
From: Trevor Murphy <trevormurphy@HIDDEN>
Date: Thu, 19 Dec 2019 18:28:12 -0800
Message-ID: <CAKpE4gmKM0RE5O8WtnY7nRcRkDU_O9Z292M0F-0f339okWMzvw@HIDDEN>
Subject: [PATCH] Fix bug in `display-buffer-reuse-mode-window'. (bug#38677)
To: 38677 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -8.0 (--------)
X-Debbugs-Envelope-To: 38677
X-Mailman-Approved-At: Thu, 19 Dec 2019 23:01:36 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -9.0 (---------)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38677; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Dec 2019 20:41:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 19 15:41:04 2019
Received: from localhost ([127.0.0.1]:45577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ii2bX-0003H6-Ta
	for submit <at> debbugs.gnu.org; Thu, 19 Dec 2019 15:41:04 -0500
Received: from lists.gnu.org ([209.51.188.17]:56116)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <trevormurphy@HIDDEN>) id 1ii2YQ-0003Bh-Tx
 for submit <at> debbugs.gnu.org; Thu, 19 Dec 2019 15:37:51 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:47671)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <trevormurphy@HIDDEN>) id 1ii2YO-0004MZ-Sa
 for bug-gnu-emacs@HIDDEN; Thu, 19 Dec 2019 15:37:50 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <trevormurphy@HIDDEN>) id 1ii2YN-0001l0-GF
 for bug-gnu-emacs@HIDDEN; Thu, 19 Dec 2019 15:37:48 -0500
Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:36786)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <trevormurphy@HIDDEN>)
 id 1ii2YM-0001gB-Hv
 for bug-gnu-emacs@HIDDEN; Thu, 19 Dec 2019 15:37:46 -0500
Received: by mail-pl1-x636.google.com with SMTP id a6so2356840plm.3
 for <bug-gnu-emacs@HIDDEN>; Thu, 19 Dec 2019 12:37:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025;
 h=user-agent:from:to:subject:date:message-id:mime-version;
 bh=B0jlckBqFIANTpmFOLnEdgru+WTCvCHErp/CoOoJd/M=;
 b=cY6QAQrA88sOpfPZajvepSg6nE+f82cqHfGyWw3ma13OywO4CGb8+5/avHDrLktQfe
 mKfetn5EQ8BY9ezKTXOueLa2SLgUj3akEPTk0Vs+eVqChIUv1SeWtlxz66NtycZJ5sHt
 RHe/3rKEAnbwr8D57MnwleScTKoJh+I4CNeVGVrInTQqDwsP6YdscsgJtfVLir3X0pjm
 gh9Z38uSwmYOJoXy/0cqAB+QB4Qx04CSdfPWy74fbmbw9SQFL+S4tjHOlY67+8UCAa0H
 t9aN8X6iKBgj6n4cx/x+ftlKOYWBfYxhkRfeGdKr8+xe6OJGQHoR0kDS7p9LJkLMV19O
 N8VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:user-agent:from:to:subject:date:message-id
 :mime-version;
 bh=B0jlckBqFIANTpmFOLnEdgru+WTCvCHErp/CoOoJd/M=;
 b=RkZW8nU9qXHjLWn6KnNPQoWA9s2lRCCW+FODj/VeXyBjuEpIFCymrIp1y7Mtg1G13s
 OaqemKJBtnvF3BHgpdArGpZtviKrv/VPng1GMBmX68lHwBCqLd8iIqt6Pw3Qx0OpnR44
 EVdW5e0HCVz3xU+PK/acloWp/TRU9eJWryjiq3iftSoaBoHRvT+gHB2AihKTE26gADKn
 A3Be62mVn8UfYIDdoIXKIRWMePhi/RjsnBuPUIKEZDMXsg+ecioVJWySTx5pxMVSRgwo
 F5SbAq8cJNux6a10N0msJ+2T4PNW/AwDZiUiMxr5Y7j/UJ0jbPq+Y5DmJDkdi6jMeJmC
 zWSg==
X-Gm-Message-State: APjAAAUEv0qQUZ6SO6xjCw1lJrOWfQ4DH8D5zcdhCTo8Oj90gSGSbWEw
 0DfQP3L+yzHIysyAaUpDvORjhza+ADc=
X-Google-Smtp-Source: APXvYqzVskalBIrgcmJQSYJzb87sYM11ChirU8tpUCE/o2M7ffxSDeBsgoj6XN44mSZAajVTl2Sucg==
X-Received: by 2002:a17:90a:d807:: with SMTP id
 a7mr12033638pjv.15.1576787863261; 
 Thu, 19 Dec 2019 12:37:43 -0800 (PST)
Received: from trevormurphy-glaptop ([2620:0:1000:3510:7f5:6834:c364:529])
 by smtp.gmail.com with ESMTPSA id o17sm7473010pjq.1.2019.12.19.12.37.42
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 19 Dec 2019 12:37:42 -0800 (PST)
User-agent: mu4e 1.2.0; emacs 26.3
From: Trevor Murphy <trevormurphy@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.3;
 `display-buffer-reuse-mode-window' doesn't check for derived modes
Date: Thu, 19 Dec 2019 12:37:40 -0800
Message-ID: <mt65pngkoxuz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::636
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 19 Dec 2019 15:41:02 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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.




Acknowledgement sent to Trevor Murphy <trevormurphy@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#38677; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 1 Oct 2020 22:45:02 UTC

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