Re: problems reading mail with mime parts
John Covici <[email protected]> Thu, 28 Nov 2019 02:11:10 -0500
| Newsgroups | gmane.mail.wanderlust.general |
|---|---|
| Organization | Covici Computer Systems |
| Message-ID | <m3sgm8wk4x.wl-covici__39748.8709235162$1574925234$gmane$org@ccs.covici.com> |
Thanks a lot for that. Where would I put the key definition to invoke
this function? Also, there is some text before the html tag, doe shr
ignore such text?
Thanks.
On Wed, 27 Nov 2019 21:47:14 -0500,
Greg Bognar wrote:
>
> > I would like to do automatically what I have been doing manually, i.e. mark
> > the region and do shr-render-region, along with disabling read only mode if
> > that is necessary. Is there a hook where I can put that?
>
> As Kazuhiro said, when there is no Content-Type header, the content is treated
> as text/plain part. You would have to tell WL the difference between a message
> body that is html and one that is plain text. My guess is that then you would
> use wl-message-buffer-created-hook and wl-message-redisplay-hook. See also
> https://www.emacswiki.org/emacs/WlHooks.
>
> Wouldn't it be easier to write a function that renders the message buffer and
> bind it to a key in wl-summary-mode-map? That way, when the cursor is on a
> message in the summary window that has only html text, you could display it with
> a keypress.
>
> You don't need to select a region and disable read-only-mode. You could use
> shr-render-buffer instead. I'm no elisp expert, but this seems to work on a
> test message:
>
> (defun render-raw-html-body ()
> (interactive)
> (let ((cur-buf (current-buffer)))
> (wl-summary-toggle-disp-msg 'on)
> (when (wl-summary-set-message-buffer-or-redisplay 'ignore-original)
> (shr-render-buffer (current-buffer))
> (set-buffer cur-buf))))
>
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici wb2una
[email protected]