Hi Robert,
I just tried patching my vm-8.2.0b version (as vm-8.2.0c) but when I
now look at emails with HTML, I get an error like this:
Inline text/html by emacs-shr display failed: Variable binding depth exceeds
max-specpdl-size
And I based my changes on your example code.
quad:~/elisp/vm-8.2.0c/lisp> diff -u ../../vm-8.2.0b/lisp/vm-mime.el vm-mime.el
--- ../../vm-8.2.0b/lisp/vm-mime.el 2011-12-27 17:19:28.000000000 -0500
+++ vm-mime.el 2019-07-25 14:44:49.000000000 -0400
@@ -2042,7 +2042,9 @@
(defun vm-mime-text/html-handler ()
(if (eq vm-mime-text/html-handler 'auto-select)
(setq vm-mime-text/html-handler
- (cond ((locate-library "w3m")
+ (cond ((locate-library "shr")
+ 'emacs-shr)
+ ((locate-library "w3m")
'emacs-w3m)
((locate-library "w3")
'w3)
@@
-2718,6 +2720,10 @@
(vm-inform 5 "No data for cid %S" url))
part))
+(defun vm-mime-display-internal-emacs-shr-text/html (start end layout)
+ (shr-render-region start end)
+ )
+
(defun vm-mime-display-internal-w3m-text/html (start end layout)
(let ((charset (or (vm-mime-get-parameter layout "charset") "us-ascii")))
(shell-command-on-region
And in my ~/.vm file I have a line:
vm-mime-text/html-handler 'emacs-shr
which is probably wrong. I guess it's time I try to learn more elisp... :-)