* bug#30870: Error opening HTML mail when mm-text-html-renderer is nil
@ 2018-03-20 1:46 Basil L. Contovounesios
2018-04-12 17:19 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Basil L. Contovounesios @ 2018-03-20 1:46 UTC (permalink / raw)
To: 30870
[-- 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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#30870: Error opening HTML mail when mm-text-html-renderer is nil
2018-03-20 1:46 bug#30870: Error opening HTML mail when mm-text-html-renderer is nil Basil L. Contovounesios
@ 2018-04-12 17:19 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-12 17:19 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: 30870
"Basil L. Contovounesios" <contovob@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-12 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 1:46 bug#30870: Error opening HTML mail when mm-text-html-renderer is nil Basil L. Contovounesios
2018-04-12 17:19 ` Lars Ingebrigtsen
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.