GNU bug report logs - #48218
[PATCH] ibuffer.el: Use display-buffer properly

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: Miha Rihtaršič <miha@HIDDEN>; Keywords: patch; dated Tue, 4 May 2021 08:52:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 48218) by debbugs.gnu.org; 4 May 2021 09:16:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 05:16:25 2021
Received: from localhost ([127.0.0.1]:51995 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldrAG-00066G-Ua
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 05:16:25 -0400
Received: from mout.gmx.net ([212.227.17.20]:32811)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1ldrAE-0005zk-PA
 for 48218 <at> debbugs.gnu.org; Tue, 04 May 2021 05:16:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1620119774;
 bh=sh1xT56CHFhB2mi3YNHA9wruaTYFMTvezQ5uZ/GDLQc=;
 h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To;
 b=j/Etz8N2I+x07XcZ5J9atY3FYCykGeyRfNBIbppvWzDbkwsiiFNb/hLIdj9GKiE8i
 mZ2N/HwXtXmWzkbIZ1nd8en4qClsPOyulCLIhopbSmP4TNCX59w/bCIS0w9Yuzu9Tn
 kUFBmuJOHBXGjLHEgHdc5/KwREmc19dXVH8PiNVM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.227]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MfYPY-1l2aSk2Msy-00fz0H; Tue, 04
 May 2021 11:16:14 +0200
Subject: Re: bug#48218: [PATCH] ibuffer.el: Use display-buffer properly
To: =?UTF-8?Q?Miha_Rihtar=c5=a1i=c4=8d?= <miha@HIDDEN>,
 48218 <at> debbugs.gnu.org
References: <20210504085442.1491551-1-miha@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <0a2782e0-6b53-a984-4d8c-f4c70b087a35@HIDDEN>
Date: Tue, 4 May 2021 11:16:13 +0200
MIME-Version: 1.0
In-Reply-To: <20210504085442.1491551-1-miha@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:1EPRSF93RuxMrCPzT/KANCaEtFu0lX0HficO1+Gj65w16BzsCbe
 5hI9RnnV+OM+Pq8jBF1g6kC6OOquxY+cSZN8XCx5bZvPAsgy3MkBsu3EjHZaGNsslWmQKD7
 WAjrPz2W4aY/U1BgCRbJmCxTwXMlxi93aOrEIU7gyLKO0fP4997boMVorm/0ywvDONGu3QP
 aw4ZBNH/q859sMGYjip1A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:sHwEmrPpSwk=:lE0H5Vw/4nFIixT51E46oP
 Fvp01RkxkQAoEUUk6VErMcYNx9IOaslIxTGgkchgyPsiI9A8vEXb+q0BnOIAswVehr63NgeL3
 uJkspAbYCrvB/sjTOo7ftDwJHzI9H8+UDLsiatrjJAP2V93Ek+xHUhIVyc8s4utYn21pjGMvE
 T/s0SvBTfERa776iQyUhxUoniOTuUAW2w63FTx28Qnxdgo++VaPijpz/FE/jgOQXoI4wK8q9w
 3kVl6QOfgttXKU97mruYlvhKHsoZMG6OZthXTul9wUd6I5Q/+kXyRhgRm7p9WFg0TkPpBoHPk
 FQtuFKHLyP2doYLeJdhU1cJ+K8NbpsjWQS4McRjGj4aMUOb8YqySS5s+howpkZChaOOKU4jEA
 Z2zUoZPx7s2zxE9BJGaDrPXg4QVySXSpiJZjOnlSMup75apda1axnkVhmKpMIfaFFtv5qoIsy
 jbP6ZEL+xENUUDY5Gm6gq6+ac72NO9lgg0Qh2syop0TbZuPb6NmIaGPcI/VMFXdTAiAZ99FjI
 4LILzUBthjSaigHVOzgSsVEzE0FbXOcnG9rjLQfclvlqokDGz4iwayG5Wnhz/JZb2KLh2nBbo
 isuPdjdAgyinKjxvOP8YaIJpSArwm+7VG4qNbFAZ1R4GQZTPU3L7w4Hblry0XRGCScumXPGEq
 EuNN+qkkR7wxCIwEMpe1k7hStDzm+p2xrysLAxQGg2gGNw8QzvEdmRoYroYW2ZMe6FbQE6oDa
 JlRNeeHOz03CyUDmdzwEPSG+Rj79Pim5oysxT9+ETJS+ee9pofGkL4m9MUA0l6eOAllJc9lNS
 pZl7ndRBM+JUUPUxr9wd82GTk27etHVFW3OB2nPYnM8s3+Lgb169SsFBbvGGtgZe7DuwlGFaS
 magkWZeidKROFBp6Yn5mTljAtmxUocaGzXzeHD4yu6vneFXtCDY1kxJvqKbJ/u6Tw72TN3hiy
 hP2fcwc6ph6a5hLaKmJGjp1M/Ymo8pDz2p4Gcn+0zt2eXlFRzQgF5iC0QMTTbeceV9AyY7tWt
 Eqpduzf9JnN3wUjyvCnkOPjojtzbwNBpPN2KESOtVaJTG2w0o3vqONLYQ1fvX0VVIBqW9bZan
 R6R7RZAoVv0+fP7F4rrCLt314LpACKlg4QwIpXfMKfWH0Q7wJvwpZa9Wd84aD72h5Kl/QatrJ
 kiiIdiA8BOOVzN230NiOLVDtd1S78Lss/gBwowUrhGDtCIMlFW9e1FoG64ihBtkBFV63Y=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48218
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.7 (-)

 > This simple patch fixes that (if
 > your window manager doesn't automatically focus newly created frames

If it does we could apply one of these

(make-frame '((no-accept-focus . t)))

(make-frame '((no-focus-on-map . t)))

but I didn't have the time to look into this.  It would require
experimenting with a number of window managers and their default
settings and customizations.

 > ).

martin




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

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


Received: (at submit) by debbugs.gnu.org; 4 May 2021 08:51:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 04:51:16 2021
Received: from localhost ([127.0.0.1]:51789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldqlw-0004WK-9K
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 04:51:16 -0400
Received: from lists.gnu.org ([209.51.188.17]:48888)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <miha@HIDDEN>) id 1ldqlu-0004WE-ES
 for submit <at> debbugs.gnu.org; Tue, 04 May 2021 04:51:14 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39208)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <miha@HIDDEN>)
 id 1ldqlu-0004lD-5X
 for bug-gnu-emacs@HIDDEN; Tue, 04 May 2021 04:51:14 -0400
Received: from kamnitnik.top ([209.250.245.214]:33302 helo=mail.kamnitnik.top)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <miha@HIDDEN>)
 id 1ldqls-00040e-1M
 for bug-gnu-emacs@HIDDEN; Tue, 04 May 2021 04:51:13 -0400
Received: from localhost (unknown [IPv6:2a00:ee2:e04:9300:b7eb:7ae7:cc56:e0da])
 by mail.kamnitnik.top (Postfix) with ESMTPSA id 93C96BBB7D;
 Tue,  4 May 2021 08:51:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top;
 s=mail; t=1620118265;
 bh=aWbNlm3xSxE1hF+fPvP5M8wjVTR4F1SkeR+8O0sLHP4=;
 h=From:To:Cc:Subject:Date:From;
 b=aES+m9t3H9IO1Gn7ex4pV5r4GfrW26SBPfYniGL7csLqoN7V81dwoNix0wVFEKims
 rg3/O57ZgzbmXHA5pb7qFKlUTU5URQS2Pc2fk74kMUnX9GX6XguGEc4sW5KgJG4uam
 Cm3qkf7iKTI4CvfziSCiHVl4NZan9gXXDZtXvaMHcurjwGMcqppwaBKovQdnT9A61E
 r6yEWILnu3qj2RpOss41BYql7FIY5qhvcH7p19aGl2ysZKCXlaOTckGROfKQy+Z8z1
 ZIMZvMfMQmj1t9FDP3NV60MDd5pw9V6yz7KAt4M/BEVN23uxk0UF8DGpAcgVbBR9A7
 McFXKMmGoAn7Q==
From: =?UTF-8?q?Miha=20Rihtar=C5=A1i=C4=8D?= <miha@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] ibuffer.el: Use display-buffer properly
Date: Tue,  4 May 2021 10:54:43 +0200
Message-Id: <20210504085442.1491551-1-miha@HIDDEN>
X-Mailer: git-send-email 2.31.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=209.250.245.214; envelope-from=miha@HIDDEN;
 helo=mail.kamnitnik.top
X-Spam_score_int: 38
X-Spam_score: 3.8
X-Spam_bar: +++
X-Spam_report: (3.8 / 5.0 requ) BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499,
 FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.999, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 3.1 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
 the administrator of that system for details.
 Content preview: Minor simplification for C-o command in ibuffer. C-o can pop
 up a new frame under some display-buffer configurations. In this case,
 `pop-to-buffer'
 focuses the new frame, but `select-window' usually f [...] 
 Content analysis details:   (3.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: kamnitnik.top (top)]
 0.9 SPF_FAIL               SPF: sender does not match SPF record (fail)
 [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;
 id=miha%40kamnitnik.top; ip=209.51.188.17; r=debbugs.gnu.org]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [209.51.188.17 listed in wl.mailspike.net]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Miha=20Rihtar=C5=A1i=C4=8D?= <miha@HIDDEN>
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: 0.1 (/)

Minor simplification for C-o command in ibuffer.
C-o can pop up a new frame under some display-buffer configurations.
In this case, `pop-to-buffer' focuses the new frame, but `select-window'
usually fails to focus the original frame. This simple patch fixes that (if
your window manager doesn't automatically focus newly created frames).


---
* lisp/ibuffer.el (ibuffer-visit-buffer-other-window-noselect): Use
display-buffer instead of pop-to-buffer and selecting the old window.
---
 lisp/ibuffer.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index b484dd717c..c80222ed0f 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -988,9 +988,7 @@ ibuffer-visit-buffer-other-window
   (let ((buf (ibuffer-current-buffer t)))
     (bury-buffer (current-buffer))
     (if noselect
-	(let ((curwin (selected-window)))
-	  (pop-to-buffer buf)
-	  (select-window curwin))
+        (display-buffer buf)
       (switch-to-buffer-other-window buf))))
 
 (defun ibuffer-visit-buffer-other-window-noselect ()
-- 
2.31.1





Acknowledgement sent to Miha Rihtaršič <miha@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#48218; 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: Tue, 4 May 2021 09:30:02 UTC

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