From: Stephen Berman <stephen.berman@gmx.net>
To: 27084@debbugs.gnu.org
Subject: bug#27084: 26.0.50; gnus-summary-toggle-header can fail to hide headers
Date: Fri, 26 May 2017 14:51:45 +0200 [thread overview]
Message-ID: <87poevpyqm.fsf@rosalinde> (raw)
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
The command `gnus-summary-toggle-header' correctly shows all headers of
an article in an Emacs bug report ephemeral group, but incorrectly fails
to rehide the headers that are hidden by default. To reproduce:
0. emacs -Q
1. C-h f gnus-re TAB (to load Gnus, making the next command available).
2. M-x gnus-read-ephemeral-emacs-bug-group RET 27008 RET (or any bug
number).
3. SPC (to display the first article, which hides some headers).
4. t (invokes `gnus-summary-toggle-header', displaying all headers of
the article).
5. Typing `t' again should now rehide the headers that were not shown in
step 3, but
=> nothing happens, i.e., all headers remain visible.
The problem seems to be that after step 4, the first line of the
*Article* buffer contains a header like this:
From unknown Fri May 26 08:24:49 2017
and gnus-summary-toggle-header tests for hidden headers by looking for a
colon before the first space in that line; since the test fails, it
treats the headers as hidden, so it doesn't hide them again.
This problem also happens with other "foreign" Gnus groups; I didn't
test all types but I see it e.g. with directory groups (`G d' in the
Gnus *Group* buffer) and the Gnus help group (`G h'). If in all such
groups the first header line is like the above but the second header
line satisfies the test (it does in the cases I looked at, but I don't
know if that's always so), then the patch below is probably the simplest
fix.
In GNU Emacs 26.0.50 (build 24, x86_64-pc-linux-gnu, GTK+ Version 3.22.8)
of 2017-05-24 built on rosalinde
Repository revision: bba9917299e3628e40462a762f2a14bb8df193f0
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-summary-toggle-header patch --]
[-- Type: text/x-patch, Size: 422 bytes --]
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 9bdd0c66f5..819b56e531 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9776,6 +9776,7 @@ gnus-summary-toggle-header
(with-current-buffer gnus-article-buffer
(widen)
(article-narrow-to-head)
+ (forward-line)
(let* ((inhibit-read-only t)
(inhibit-point-motion-hooks t)
(hidden (if (numberp arg)
next reply other threads:[~2017-05-26 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 12:51 Stephen Berman [this message]
2017-07-20 7:17 ` bug#27084: 26.0.50; gnus-summary-toggle-header can fail to hide headers Katsumi Yamaoka
2017-07-20 8:44 ` Stephen Berman
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=87poevpyqm.fsf@rosalinde \
--to=stephen.berman@gmx.net \
--cc=27084@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.