all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: 29696@debbugs.gnu.org
Subject: bug#29696: Reading summary keys from article changes window configuration
Date: Wed, 13 Dec 2017 20:24:43 +0000	[thread overview]
Message-ID: <87lgi6pe9g.fsf@gmail.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Do-not-pop-to-buffer-for-reading-gnus-summary-keys.patch --]
[-- Type: text/x-diff, Size: 1212 bytes --]

From f615268be55ddfdfdc9c3c2f4f0a15ad6bafa183 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
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


[-- Attachment #2: Type: text/plain, Size: 1191 bytes --]


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

             reply	other threads:[~2017-12-13 20:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 20:24 Basil L. Contovounesios [this message]
2017-12-14  4:45 ` bug#29696: Reading summary keys from article changes window configuration Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgi6pe9g.fsf@gmail.com \
    --to=contovob@tcd.ie \
    --cc=29696@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.