GNU bug report logs - #32706
27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article

Previous Next

Package: emacs;

Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>

Date: Tue, 11 Sep 2018 20:18:02 UTC

Severity: normal

Found in version 27.0.50

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32706 in the body.
You can then email your comments to 32706 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32706; Package emacs. (Tue, 11 Sep 2018 20:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Filipp Gunbin <fgunbin <at> fastmail.fm>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 11 Sep 2018 20:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Gnus ignores gnus-visual nil after
 gnus-article-outlook-deuglify-article
Date: Tue, 11 Sep 2018 23:00:52 +0300
I have gnus-visual set to nil and articles are not fontified (correct).

But if I invoke `W Y f' (gnus-article-outlook-deuglify-article) on an
article, then it gets fontified.  It's not the only command after which
I observe such behavior.

It's not easy to reproduce this with emacs -Q, but I'd be happy to help
if you tell me how.

Thanks.


In GNU Emacs 27.0.50 (build 7, x86_64-apple-darwin17.7.0)
 of 2018-09-11 built on fgunbin.playteam.ru
Repository revision: 94297848332f01a18b5a6a7d29f46d03dcd881ec
System Description:  Mac OS X 10.13.6

Configured using:
 'configure CC=/usr/bin/gcc --without-x --without-sound --without-ns
 --with-dbus --with-file-notification=no --with-gnutls --with-json
 --with-modules --with-threads --with-xml2 --with-zlib'

Configured features:
JPEG ACL GNUTLS LIBXML2 ZLIB MODULES THREADS GMP

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: ru_RU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Article

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  minibuffer-depth-indicate-mode: t
  display-time-mode: t
  display-battery-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  file-name-shadow-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32706; Package emacs. (Wed, 12 Sep 2018 07:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 32706 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Filipp Gunbin <fgunbin <at> fastmail.fm>
Cc: 32706 <at> debbugs.gnu.org
Subject: Re: bug#32706: 27.0.50; Gnus ignores gnus-visual nil after
 gnus-article-outlook-deuglify-article
Date: Wed, 12 Sep 2018 16:21:55 +0900
On Tue, 11 Sep 2018 23:00:52 +0300, Filipp Gunbin wrote:
> I have gnus-visual set to nil and articles are not fontified (correct).

> But if I invoke `W Y f' (gnus-article-outlook-deuglify-article) on an
> article, then it gets fontified.  It's not the only command after which
> I observe such behavior.

I tried this fix at first:

--- deuglify.el~	2018-02-18 21:35:29.069455800 +0000
+++ deuglify.el	2018-09-12 07:18:02.820308500 +0000
@@ -301,3 +301,4 @@
     ;; this is a bug or not.
-    (gnus-article-highlight t)
+    (when (gnus-visual-p 'article-highlight 'highlight)
+      (gnus-article-highlight t))
     (gnus-treat-article nil)

But I found this function is still problematic.  That is,
`(gnus-treat-article nil)' there runs in an article including
headers, so, if gnus-visual is non-nil, the treatments are
performed on not only the article body but also the header ---
the header is buttonized if gnus-treat-buttonize is non-nil even
if gnus-treat-buttonize-head is nil, for example.  So, I've
installed the next one in the trunk:

--- deuglify.el~	2018-02-18 21:35:29.069455800 +0000
+++ deuglify-2.el	2018-09-12 07:18:02.821397300 +0000
@@ -300,6 +300,12 @@
     ;; prepared article removes all MIME parts.  I'm unsure whether
     ;; this is a bug or not.
-    (gnus-article-highlight t)
-    (gnus-treat-article nil)
+    (when (gnus-visual-p 'article-highlight 'highlight)
+      (gnus-article-highlight t))
+    (save-excursion
+      (save-restriction
+	(widen)
+	(article-goto-body)
+	(narrow-to-region (point) (point-max))
+	(gnus-treat-article nil)))
     (gnus-run-hooks 'gnus-article-prepare-hook
 		    'gnus-outlook-display-hook)))

Unfortunately I have no idea not to buttonize the header of a
forwarded message existing in the article as a mime part, though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32706; Package emacs. (Wed, 12 Sep 2018 15:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 32706 <at> debbugs.gnu.org (full text, mbox):

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 32706 <at> debbugs.gnu.org
Subject: Re: bug#32706: 27.0.50; Gnus ignores gnus-visual nil after
 gnus-article-outlook-deuglify-article
Date: Wed, 12 Sep 2018 18:16:34 +0300
Thanks!

This is a bit confusing to me because of the following.

> But I found this function is still problematic.  That is,
> `(gnus-treat-article nil)' there runs in an article including
> headers, so, if gnus-visual is non-nil, the treatments are
> performed on not only the article body but also the header ---
> the header is buttonized if gnus-treat-buttonize is non-nil even
> if gnus-treat-buttonize-head is nil, for example.  So, I've
> installed the next one in the trunk:

1) gnus-article-add-buttons (invoked when gnus-treat-buttonize is in
gnus-visual) explicitly skips the headers.  How is that possible that
you see them buttonized?

2) It looks like (gnus-treat-article nil) should take care of
highlighting itself, so probably we can omit (gnus-article-highlight t)
in gnus-outlook-display-article-buffer.

I don't know Gnus code enough to be sure.

Filipp




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32706; Package emacs. (Thu, 13 Sep 2018 00:04:01 GMT) Full text and rfc822 format available.

Message #14 received at 32706 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Filipp Gunbin <fgunbin <at> fastmail.fm>
Cc: 32706 <at> debbugs.gnu.org
Subject: Re: bug#32706: 27.0.50; Gnus ignores gnus-visual nil after
 gnus-article-outlook-deuglify-article
Date: Thu, 13 Sep 2018 09:02:45 +0900
On Wed, 12 Sep 2018 18:16:34 +0300, Filipp Gunbin wrote:
> This is a bit confusing to me because of the following.

On Wed, 12 Sep 2018 16:21:55 +0900, Katsumi Yamaoka wrote:
>> ...if gnus-visual is non-nil...
>> the header is buttonized if gnus-treat-buttonize is non-nil even
>> if gnus-treat-buttonize-head is nil, for example.

> 1) gnus-article-add-buttons (invoked when gnus-treat-buttonize is in
> gnus-visual) explicitly skips the headers.  How is that possible that
> you see them buttonized?

I realized at last why all the treatment functions run on the
whole article buffer.

1999-01-18 09:40:37  Lars Magne Ingebrigtsen  <larsi <at> gnus.org>

	* gnus-art.el (article-goto-body-goes-to-point-min-p): New variable.
	(article-goto-body): Use it.
	(gnus-treat-article): Ditto.

gnus-treat-article binds a-g-b-g-t-point-min-p to t, that forces
article-goto-body to go to point-min and return always t.  So,
the article buffer should be narrowed to the body while performing
`(gnus-treat-article nil)' as I did in the trunk.

> 2) It looks like (gnus-treat-article nil) should take care of
> highlighting itself, so probably we can omit (gnus-article-highlight t)
> in gnus-outlook-display-article-buffer.

I see.  I've omitted it in the trunk.  Thanks.




bug closed, send any further explanations to 32706 <at> debbugs.gnu.org and Filipp Gunbin <fgunbin <at> fastmail.fm> Request was from Katsumi Yamaoka <yamaoka <at> jpl.org> to control <at> debbugs.gnu.org. (Thu, 13 Sep 2018 21:50:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32706; Package emacs. (Thu, 13 Sep 2018 23:53:01 GMT) Full text and rfc822 format available.

Message #19 received at 32706 <at> debbugs.gnu.org (full text, mbox):

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 32706 <at> debbugs.gnu.org
Subject: Re: bug#32706: 27.0.50; Gnus ignores gnus-visual nil after
 gnus-article-outlook-deuglify-article
Date: Fri, 14 Sep 2018 02:52:25 +0300
Looks good, thanks!

On 13/09/2018 09:02 +0900, Katsumi Yamaoka wrote:

[..]
> I realized at last why all the treatment functions run on the
> whole article buffer.
[..]
> gnus-treat-article binds a-g-b-g-t-point-min-p to t, that forces
> article-goto-body to go to point-min and return always t.  So, the
> article buffer should be narrowed to the body while performing
> `(gnus-treat-article nil)' as I did in the trunk.

Yes, I see.

Filipp




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Oct 2018 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 247 days ago.

Previous Next


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