all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article
@ 2018-09-11 20:00 Filipp Gunbin
  2018-09-12  7:21 ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Filipp Gunbin @ 2018-09-11 20:00 UTC (permalink / raw)
  To: 32706

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article
  2018-09-11 20:00 bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article Filipp Gunbin
@ 2018-09-12  7:21 ` Katsumi Yamaoka
  2018-09-12 15:16   ` Filipp Gunbin
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2018-09-12  7:21 UTC (permalink / raw)
  To: Filipp Gunbin; +Cc: 32706

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article
  2018-09-12  7:21 ` Katsumi Yamaoka
@ 2018-09-12 15:16   ` Filipp Gunbin
  2018-09-13  0:02     ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Filipp Gunbin @ 2018-09-12 15:16 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 32706

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article
  2018-09-12 15:16   ` Filipp Gunbin
@ 2018-09-13  0:02     ` Katsumi Yamaoka
  2018-09-13 23:52       ` Filipp Gunbin
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2018-09-13  0:02 UTC (permalink / raw)
  To: Filipp Gunbin; +Cc: 32706

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@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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article
  2018-09-13  0:02     ` Katsumi Yamaoka
@ 2018-09-13 23:52       ` Filipp Gunbin
  0 siblings, 0 replies; 5+ messages in thread
From: Filipp Gunbin @ 2018-09-13 23:52 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 32706

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-13 23:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11 20:00 bug#32706: 27.0.50; Gnus ignores gnus-visual nil after gnus-article-outlook-deuglify-article Filipp Gunbin
2018-09-12  7:21 ` Katsumi Yamaoka
2018-09-12 15:16   ` Filipp Gunbin
2018-09-13  0:02     ` Katsumi Yamaoka
2018-09-13 23:52       ` Filipp Gunbin

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.