From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#29696: Reading summary keys from article changes window configuration Date: Wed, 13 Dec 2017 20:24:43 +0000 Message-ID: <87lgi6pe9g.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1513196714 20706 195.159.176.226 (13 Dec 2017 20:25:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2017 20:25:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 29696@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 13 21:25:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePDaX-000528-1d for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Dec 2017 21:25:09 +0100 Original-Received: from localhost ([::1]:37505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePDac-0001ey-I1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Dec 2017 15:25:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePDaW-0001dY-VN for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2017 15:25:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePDaS-0004wL-SL for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2017 15:25:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePDaS-0004w1-MV for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2017 15:25:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePDaQ-0005Av-PR; Wed, 13 Dec 2017 15:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 13 Dec 2017 20:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29696 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org (The Gnus Bugfixing Girls + Boys) Original-Received: via spool by submit@debbugs.gnu.org id=B.151319669719877 (code B ref -1); Wed, 13 Dec 2017 20:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Dec 2017 20:24:57 +0000 Original-Received: from localhost ([127.0.0.1]:60836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePDaK-0005AW-Sd for submit@debbugs.gnu.org; Wed, 13 Dec 2017 15:24:57 -0500 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:42610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePDaJ-0005AJ-AC for submit@debbugs.gnu.org; Wed, 13 Dec 2017 15:24:55 -0500 Original-Received: by mail-wm0-f48.google.com with SMTP id b199so7456822wme.1 for ; Wed, 13 Dec 2017 12:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:user-agent:mime-version; bh=0OQ8b6Ec0q/cwOPb/dy2J1y6NlnYz+jX82PJ4Kk+gwc=; b=UM3wcsgS1Ra1GZiMFPHRzy6VBTysMj6TT/5FjkyOmlvw10IeZxKAWVVxnSAzqJgpb0 vJVliJFhexy3UDOkV7nqlMqVkB9UcLnBfjFweT3Lgw+jsx5YnIyNuaIm0a7s8A6bXveI 96u9HtZ5SdWf12ZEituaNbuhGD0VP8JAgA1NemaLj2+cTsQjPGNLo+ZYweJXA5sdXVdv 85RrUN4FBJXq0Jo90QPLrJkmXlmDRqGggEkCstxfo4le14pVC/Ml21nG2hFycDpy4W+C ukWhPDvDobrU3IaOcB3jGGFfu8niC45U9y8ZlfXDnT/Hm5c6CIsiZdXk/QFX91BzWUKK qCqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=0OQ8b6Ec0q/cwOPb/dy2J1y6NlnYz+jX82PJ4Kk+gwc=; b=EREpnkI+FI4Y4Sir2qBSYz7GTmXQP24YtI9G08iX8SsyWAfLyViyLAR9CYmgBLMWiY iF+Gmd2xeQZ8ClpZZGC0h+yH9SwUJJFQe1n21ABxD2hH05iqizlWi/61md8AHcRmNQlC T3TwCIayGhk7BYYAbR+498/Sj17+Hm5u3rk+HDC9xAUBWsiGJ87+utsyrIGGStdExpYC gcAlfwWa6hEwE8vwWqPsiil6V5fBmp01SoZ+9eUgQB9aWJVOb/dqQk/USQ4gM7A68hEi w28pmJi21S2zJ+Jhatq4jQLxtcXxVExZIs2hKjLA91nnbmyz+/4pFQoz98V7/aGgOAEY iaBw== X-Gm-Message-State: AKGB3mJKMaG9MQUwnVTACzOtJhnKew7dZ7W0nndefT6Nr12Xaa/QqhrF uQ+fCUOxwWhx+JJaRw37ibwQNgt4 X-Google-Smtp-Source: ACJfBouw5oRpk6VMfz31Lt8UCKvnbBAo0C1OQFgJzyYKqLAjMeiYrsGL/dH94w0KSnpGcCEp9ougxg== X-Received: by 10.80.137.111 with SMTP id f44mr9285932edf.257.1513196689149; Wed, 13 Dec 2017 12:24:49 -0800 (PST) Original-Received: from localhost ([213.233.148.16]) by smtp.gmail.com with ESMTPSA id d9sm2085847edb.18.2017.12.13.12.24.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2017 12:24:48 -0800 (PST) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141046 Archived-At: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Do-not-pop-to-buffer-for-reading-gnus-summary-keys.patch >From f615268be55ddfdfdc9c3c2f4f0a15ad6bafa183 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 13 Dec 2017 19:55:15 +0000 Subject: [PATCH] Do not pop to buffer for reading gnus summary keys * lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): Lookup summary buffer keys from article buffer without affecting window configuration. --- lisp/gnus/gnus-art.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 6ee0d7b023..51e2a9a21f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6711,11 +6711,10 @@ gnus-article-read-summary-keys (member keys nosave-but-article) (member keys nosave-in-article)) (let (func) - (save-window-excursion - (pop-to-buffer gnus-article-current-summary) - ;; We disable the pick minor mode commands. - (let (gnus-pick-mode) - (setq func (key-binding keys t)))) + (with-current-buffer gnus-article-current-summary + ;; We disable the pick minor mode commands. + (let (gnus-pick-mode) + (setq func (key-binding keys t)))) (if (or (not func) (numberp func)) (ding) -- 2.15.1 --=-=-= Content-Type: text/plain Using Gnus with the user option pop-up-frames set to 'graphic-only, I observe the following behaviour: 1. Visit an article. 2. Make article window the sole window in its containing frame. 3. Type = (gnus-summary-expand-window). Expected result: The article's summary replaces the article in the frame's sole window. Actual result: The expected result plus an additional frame displaying the corresponding summary buffer. In other words, expanding the article window causes an extraneous frame to be created. I believe this is caused by a call to pop-to-buffer within save-window-excursion in the function gnus-article-read-summary-keys. Is the call to pop-to-buffer really necessary for the purpose of key lookup? Wouldn't changing the current buffer suffice, so as not to affect the window configuration in the first place? If so, please consider the attached patch which addresses this. The docstring of save-window-excursion even warns of the possibility of behaviour like the one I describe. The information gathered by gnus-bug follows my signature. Thanks, -- Basil Gnus v5.13 GNU Emacs 27.0.50 (build 9, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2017-12-05 --=-=-=--