From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: 30870@debbugs.gnu.org
Subject: bug#30870: Error opening HTML mail when mm-text-html-renderer is nil
Date: Tue, 20 Mar 2018 01:46:22 +0000 [thread overview]
Message-ID: <87in9rldsh.fsf@tcd.ie> (raw)
[-- Attachment #1: Backtrace --]
[-- Type: text/plain, Size: 3692 bytes --]
Debugger entered--Lisp error: (void-function nil)
nil((#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil))
apply(nil (#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil) nil)
(cond ((functionp func) (funcall func handle)) (t (apply (car func) handle (cdr func))))
(let* ((func mm-text-html-renderer) (entry (assq func mm-text-html-renderer-alist)) (inhibit-read-only t)) (if entry (setq func (cdr entry))) (cond ((functionp func) (funcall func handle)) (t (apply (car func) handle (cdr func)))))
(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))) (cond ((functionp func) (funcall func handle)) (t (apply (car func) handle (cdr func))))))
mm-inline-text-html((#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil))
mm-display-inline((#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil))
gnus-mime-display-single((#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil))
gnus-mime-display-part((#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil))
gnus-mime-display-part((#("multipart/related" 0 17 (boundary "----=_Part_3611803_15130720.1521495438553" buffer #<buffer *mm*-582300> from "foo@bar.com" start nil)) (#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil) (#<buffer *mm*-743752> ("image/jpeg" (name . "barcode_2F72GF.jpg")) base64 nil ("attachment" (filename . "barcode_2F72GF.jpg")) nil nil "<barcode_2F72GF.jpg>")))
gnus-display-mime((#("multipart/related" 0 17 (boundary "----=_Part_3611803_15130720.1521495438553" buffer #<buffer *mm*-582300> from "foo@bar.com" start nil)) (#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil) (#<buffer *mm*-743752> ("image/jpeg" (name . "barcode_2F72GF.jpg")) base64 nil ("attachment" (filename . "barcode_2F72GF.jpg")) nil nil "<barcode_2F72GF.jpg>")))
gnus-mime-display-alternative(((#<buffer *mm*-616996> ("text/plain" (charset . "us-ascii")) 7bit nil ("inline") nil nil nil) (#("multipart/related" 0 17 (boundary "----=_Part_3611803_15130720.1521495438553" buffer #<buffer *mm*-582300> from "foo@bar.com" start nil)) (#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil) (#<buffer *mm*-743752> ("image/jpeg" (name . "barcode_2F72GF.jpg")) base64 nil ("attachment" (filename . "barcode_2F72GF.jpg")) nil nil "<barcode_2F72GF.jpg>"))) nil nil 1)
gnus-mime-display-part((#("multipart/alternative" 0 21 (boundary "----=_Part_3611802_12201241.1521495438553" buffer #<buffer *mm*-774885> from "foo@bar.com" start nil)) (#<buffer *mm*-616996> ("text/plain" (charset . "us-ascii")) 7bit nil ("inline") nil nil nil) (#("multipart/related" 0 17 (boundary "----=_Part_3611803_15130720.1521495438553" buffer #<buffer *mm*-582300> from "foo@bar.com" start nil)) (#<buffer *mm*-901610> ("text/html" (charset . "us-ascii")) 7bit nil nil nil nil nil) (#<buffer *mm*-743752> ("image/jpeg" (name . "barcode_2F72GF.jpg")) base64 nil ("attachment" (filename . "barcode_2F72GF.jpg")) nil nil "<barcode_2F72GF.jpg>"))))
gnus-display-mime()
gnus-article-prepare-display()
gnus-article-prepare(62 nil)
gnus-summary-display-article(62 nil)
gnus-summary-select-article(nil nil pseudo)
gnus-summary-scroll-up(1)
funcall-interactively(gnus-summary-scroll-up 1)
call-interactively(gnus-summary-scroll-up nil nil)
command-execute(gnus-summary-scroll-up)
[-- Attachment #2: Type: text/plain, Size: 598 bytes --]
(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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Workaround --]
[-- Type: text/x-diff, Size: 2972 bytes --]
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)
next reply other threads:[~2018-03-20 1:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 1:46 Basil L. Contovounesios [this message]
2018-04-12 17:19 ` bug#30870: Error opening HTML mail when mm-text-html-renderer is nil Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87in9rldsh.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=30870@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).