Discussion:
[VM] How to view HTML mail?
Skip Montanaro
2011-04-20 11:36:53 UTC
Permalink
How do I set up VM to properly display HTML mail messages (or hand them off
to something which can)? I'm running VM 8.1.93a with GNU Emacs 23.1.1 on
Mac OS X. I see a variable, Vm Mime Text/Html Handler, which is set to
auto-select, but when I attempt to view an HTML mail it says something like
"inline display by nil failed". (Sorry, the message doesn't stick around long
in the minibuffer and view-lossage doesn't display it.) I see w3m and w3 as
choices but don't know what either one is or how to install them (does GNU
Emacs have a package installer like XEmacs? If so, I couldn't find it.) I
don't have lynx.

Thanks,

Skip Montanaro
Reinhard Kotucha
2011-04-20 14:27:41 UTC
Permalink
Post by Skip Montanaro
How do I set up VM to properly display HTML mail messages (or hand
them off to something which can)? I'm running VM 8.1.93a with GNU
Emacs 23.1.1 on Mac OS X. I see a variable, Vm Mime Text/Html
Handler, which is set to auto-select, but when I attempt to view an
HTML mail it says something like "inline display by nil failed".
(Sorry, the message doesn't stick around long in the minibuffer and
view-lossage doesn't display it.) I see w3m and w3 as choices but
don't know what either one is or how to install them (does GNU
Emacs have a package installer like XEmacs? If so, I couldn't find
it.) I don't have lynx.
I have

(setq vm-mime-alternative-select-method
'(favorite "text/plain" "text/html"))

and it works fine. I recommend to comment out all the other
(vm-auto-*, vm-mime-* variables) first, if you have set them. They
caused a lot of confusion...

Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
Joost Kremers
2011-04-20 14:36:05 UTC
Permalink
Post by Skip Montanaro
"inline display by nil failed". (Sorry, the message doesn't stick around long
in the minibuffer and view-lossage doesn't display it.)
C-x b *Messages* RET
--
Joost Kremers, PhD
University of Göttingen
Institute for German Philology
Käte-Hamburger-Weg 3
37073 Göttingen, Germany
Uday S Reddy
2011-04-20 16:05:27 UTC
Permalink
Post by Skip Montanaro
How do I set up VM to properly display HTML mail messages (or hand them off
to something which can)? I'm running VM 8.1.93a with GNU Emacs 23.1.1 on
Mac OS X. I see a variable, Vm Mime Text/Html Handler, which is set to
auto-select, but when I attempt to view an HTML mail it says something like
"inline display by nil failed".
That looks like a bug. If you can identify the exact error message you get,
I can try and tack it down.
Post by Skip Montanaro
I see w3m and w3 as
choices but don't know what either one is or how to install them (does GNU
Emacs have a package installer like XEmacs? If so, I couldn't find it.) I
don't have lynx.
emacs-w3m is the best choice. See the Emacswiki page

http://www.emacswiki.org/emacs/ViewMailAndWThreeM

for how to set it up. (I didn't bother to recompile VM after installing
emacs-w3m, but it worked quite ok nevertheless.)

Cheers,
Uday
s***@pobox.com
2011-04-20 18:07:52 UTC
Permalink
Post by Skip Montanaro
How do I set up VM to properly display HTML mail messages (or hand
them off to something which can)? I'm running VM 8.1.93a with GNU
Emacs 23.1.1 on Mac OS X. I see a variable, Vm Mime Text/Html
Handler, which is set to auto-select, but when I attempt to view an
HTML mail it says something like "inline display by nil failed".
Uday> That looks like a bug. If you can identify the exact error
Uday> message you get, I can try and tack it down.

Here's the message:

Inline text/html by nil display failed: (error "No handler for internal display of text/html")

Thank you for the emacs-w3m pointer. That seems to be working.

Skip
Uday S Reddy
2011-04-21 00:45:14 UTC
Permalink
Post by s***@pobox.com
Inline text/html by nil display failed: (error "No handler for internal display of text/html")
This seems basically ok. It is arising because your options say that
text/html should be displayed internally, but you haven't installed a
handler for internally displaying text/html.

After giving this message, VM will then go on to try external viewers if
they are available.

Cheers,
Uday
Skip Montanaro
2011-04-22 12:47:05 UTC
Permalink
Post by s***@pobox.com
Thank you for the emacs-w3m pointer. That seems to be working.
Is there a way to get it to include URLs at the bottom of the displayed
page as footnotes the way Lynx does? I looked through the w3m
man page and online manual and all its options but nothing jumped
out at me.

Thanks,

Skip Montanaro
Uday S Reddy
2011-04-22 13:10:19 UTC
Permalink
Post by Skip Montanaro
Is there a way to get it to include URLs at the bottom of the displayed
page as footnotes the way Lynx does? I looked through the w3m
man page and online manual and all its options but nothing jumped
out at me.
I don't think emacs-w3m has a way to generate the footnotes for Lynx.

However, emacs-w3m is used as a minor mode in the VM Presentation buffer.
So, all the emacs-w3m key bindings are in effect. You can use the
down-arrow and up-arrow keys to navigate to the hyperlinks. And, the URL is
always displayed in the mini-buffer when the cursor is on a hyperlink.

Cheers,
Uday
Skip Montanaro
2011-04-22 13:33:35 UTC
Permalink
Post by Uday S Reddy
I don't think emacs-w3m has a way to generate the footnotes for Lynx.
However, emacs-w3m is used as a minor mode in the VM Presentation buffer.
So, all the emacs-w3m key bindings are in effect. You can use the
down-arrow and up-arrow keys to navigate to the hyperlinks. And, the URL is
always displayed in the mini-buffer when the cursor is on a hyperlink.
Ah, okay. I misunderstood the degree of the connection between w3m and
emacs-w3m. I thought all it was doing was inserting the output of
'w3m -dump' into the presentation buffer. I'll keep messing around with
instances of HTML mail as I encounter them to see what I can do.

Thanks,

Skip
Skip Montanaro
2011-04-22 14:23:30 UTC
Permalink
I'll keep messing around with instances of HTML mail as I
encounter them to see what I can do.
Hmmm... I'm having trouble seeing that it does anything other than
simply insert "w3m -dump" output. I browsed the entire output of
describe-bindings but saw nothing w3m-related. I see no indication
of an active emacs-w3m minor mode in the mode lines for either the
summary or presentation buffers. Nothing is displayed in any
alternate fonts to suggest the presence of a link. When I navigate
to an obvious link, such as the all-too-ubiquitous "Click Here" then
hit the return key it displays VM's usual "Go to message:" prompt
in the minibuffer. So, I commented out all but the barest VM
essentials in my .emacs file and renamed my .vm file to .vm- and
restarted Emacs. Nothing changed. I am visiting an HTML email
now. The message body looks like "w3m -dump" output. If I
press 'D' it collapses to a single banner with a red background and
white text which reads "HTML, ISO-8859-1 [Press RETURN to display
text]". Another 'D' shows the raw MIME content. One more and I'm
back to the "w3m -dump" output. There is no background w3m
process running and no subprocess buffer to suggest there's a
process to communicate with.

I poked around in the customization settings and found something
called "mm-inline-text-html-with-w3m-keymap" and set it to t.
That had no effect even after saving for future sessions and
restarting. (Now, oddly enough, when I try to search for settings
matching "w3m" it no longer turns up and describe-variable doesn't
know about it.

I must be missing something, perhaps some other bit of
customization?

Skip
Uday S Reddy
2011-04-22 15:06:16 UTC
Permalink
Post by Skip Montanaro
I must be missing something, perhaps some other bit of
customization?
Looks like you don't have emacs-w3m working. Cab you double check all the
steps in the EmacsWiki page once again, especially the last step?

Cheers,
Uday
Skip Montanaro
2011-04-22 19:28:23 UTC
Permalink
Post by Uday S Reddy
Looks like you don't have emacs-w3m working. Cab you double check all the
steps in the EmacsWiki page once again, especially the last step?
Thanks for your persistence (and patience). I had vm installed in

/usr/local/share/emacs/site-lisp

while emacs-w3m was installed in

~/local/share/emacs/site-lisp

but a copy-n-paste error had me trying to find emacs-w3m in the /usr/local/...
location. I seem to have it working properly now, colorized and everything.
It took me awhile but I even figured out how to use the "open" command instead
of "netscape" on my Mac to open URLs.

Thx,

Skip

Loading...