GNU bug report logs - #30870
Error opening HTML mail when mm-text-html-renderer is nil

Previous Next

Packages: emacs, gnus;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Tue, 20 Mar 2018 01:47:02 UTC

Severity: normal

Tags: fixed

Found in version 5.13

Done: Lars Ingebrigtsen <larsi <at> gnus.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 30870 in the body.
You can then email your comments to 30870 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, bugs <at> gnus.org:
bug#30870; Package emacs,gnus. (Tue, 20 Mar 2018 01:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org. (Tue, 20 Mar 2018 01:47:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: Error opening HTML mail when mm-text-html-renderer is nil
Date: Tue, 20 Mar 2018 01:46:22 +0000
[backtrace.txt (text/plain, attachment)]
[Message part 2 (text/plain, inline)]
(Hopefully someone else can reproduce this issue without my having to
 start an uncustomised Gnus.)

1. M-x toggle-debug-on-error RET
2. M-x set-variable RET mm-text-html-renderer RET nil RET
3. Open a HTML article in Gnus, e.g. by typing RET in a summary buffer

This results in the attached backtrace.

I'm quite unfamiliar with the relevant code, but the patch I am
currently using as a workaround follows my signature, as do listings of
my Gnus and Emacs versions.

Thanks,

-- 
Basil

Gnus v5.13
GNU Emacs 27.0.50 (build 16, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-03-19

[foo.diff (text/x-diff, inline)]
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index c11af7060b..6cd93c91a4 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -311,17 +311,18 @@ mm-inline-render-with-function
 
 (defun mm-inline-text-html (handle)
   (if (stringp (car handle))
-      (mapcar 'mm-inline-text-html (cdr handle))
-    (let* ((func mm-text-html-renderer)
-	   (entry (assq func mm-text-html-renderer-alist))
-	   (inhibit-read-only t))
-      (if entry
-	  (setq func (cdr entry)))
+      (mapcar #'mm-inline-text-html (cdr handle))
+    (let ((func (alist-get mm-text-html-renderer
+                           mm-text-html-renderer-alist
+                           mm-text-html-renderer))
+          (inhibit-read-only t))
       (cond
        ((functionp func)
 	(funcall func handle))
+       ((functionp (car func))
+        (apply (car func) handle (cdr func)))
        (t
-	(apply (car func) handle (cdr func)))))))
+        (mm-interactively-view-part handle))))))
 
 (defun mm-inline-text-vcard (handle)
   (let ((inhibit-read-only t))
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index 3d202890b6..f1256bdef5 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -165,8 +165,8 @@ mh-mm-save-part
 
 (defun mh-mm-text-html-renderer ()
   "Find the renderer Gnus is using to display text/html MIME parts."
-  (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer)
-      (and (boundp 'mm-text-html-renderer) mm-text-html-renderer)))
+  (or (bound-and-true-p mm-inline-text-html-renderer)
+      (bound-and-true-p mm-text-html-renderer)))
 
 (provide 'mh-gnus)
 
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index e2c682a399..8ad1877327 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -140,9 +140,7 @@ mh-mm-inline-media-tests
     ("text/html"
      ,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text)
      (lambda (handle)
-       (or (and (boundp 'mm-inline-text-html-renderer)
-                mm-inline-text-html-renderer)
-           (and (boundp 'mm-text-html-renderer) mm-text-html-renderer))))
+       (mh-mm-text-html-renderer)))
     ("text/x-vcard"
      mh-mm-inline-text-vcard
      (lambda (handle)
@@ -781,9 +779,9 @@ mh-small-image-p
         (mm-inline-large-images t))
     (and media-test
          (equal (mm-handle-media-supertype handle) "image")
-         (funcall media-test handle) ; Since mm-inline-large-images is T,
-                                        ; this only tells us if the image is
-                                        ; something that emacs can display
+         (funcall media-test handle) ; Since `mm-inline-large-images' is t,
+                                     ; this only tells us if the image is
+                                     ; something that Emacs can display
          (let* ((image (mm-get-image handle)))
            (or (mh-do-in-xemacs
                  (and (mh-funcall-if-exists glyphp image)

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#30870; Package emacs,gnus. (Thu, 12 Apr 2018 17:20:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 30870 <at> debbugs.gnu.org
Subject: Re: bug#30870: Error opening HTML mail when mm-text-html-renderer is
 nil
Date: Thu, 12 Apr 2018 19:19:33 +0200
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> (Hopefully someone else can reproduce this issue without my having to
>  start an uncustomised Gnus.)
>
> 1. M-x toggle-debug-on-error RET
> 2. M-x set-variable RET mm-text-html-renderer RET nil RET
> 3. Open a HTML article in Gnus, e.g. by typing RET in a summary buffer
>
> This results in the attached backtrace.
>
> I'm quite unfamiliar with the relevant code, but the patch I am
> currently using as a workaround follows my signature, as do listings of
> my Gnus and Emacs versions.

As this hasn't been working for quite a while, apparently, and nil is a
nonsensical value (popping up Firefox every time you happen to click on
an email that contains an HTML part sounds unsafe), I've now removed
that option instead of fixing it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 12 Apr 2018 17:20:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 30870 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 12 Apr 2018 17:20:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 7 years and 35 days ago.

Previous Next


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