[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27084: 26.0.50; gnus-summary-toggle-header can fail to hide headers

From: Katsumi Yamaoka
Subject: bug#27084: 26.0.50; gnus-summary-toggle-header can fail to hide headers
Date: Thu, 20 Jul 2017 16:17:10 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin)

On Fri, 26 May 2017 14:51:45 +0200, Stephen Berman wrote:
> 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:

Oops.  Sorry.  That's my fault:

2004-10-01  Katsumi Yamaoka  <address@hidden>

        * gnus-sum.el (gnus-summary-toggle-header): Make it work even if
        there's no visible header.

--- ngnus-0.2/lisp/gnus-sum.el  2004-04-25 18:01:33.000000000 +0000
+++ ngnus-0.3/lisp/gnus-sum.el  2005-03-03 18:00:15.000000000 +0000
@@ -8810,7 +8911,8 @@
             (inhibit-point-motion-hooks t)
             (hidden (if (numberp arg)
                         (>= arg 0)
-                      (gnus-article-hidden-text-p 'headers)))
+                      (or (not (looking-at "[^ \t\n]+:"))
+                          (gnus-article-hidden-text-p 'headers))))
             s e)
        (delete-region (point-min) (point-max))
        (with-current-buffer gnus-original-article-buffer

An article that the change intended so as to make
`gnus-summary-toggle-header' work for was the one in which there
is no visible header that `gnus-visible-headers' specifies, like

Delivered-To: foo
Received: from...
Received: from...
MIME-Version: 1.0

That is, it's broken, there is no From, To, Cc, etc. as usual.
Anyway I've fixed it by replacing (not (looking-at "[^ \t\n]+:"))
with (looking-at "\n?\\'") + a comment.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]