From: Felix Natter <fnatter@gmx.net>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: ding@gnus.org
Subject: Re: View HTML Mail in Browser
Date: Sat, 06 Feb 2021 22:33:18 +0100 [thread overview]
Message-ID: <87r1lsq3tt.fsf@gmx.net> (raw)
In-Reply-To: <874kipqomu.fsf@igel.home> (Andreas Schwab's message of "Sat, 06 Feb 2021 15:03:53 +0100")
hi Andreas,
thanks for the reply.
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Feb 06 2021, Felix Natter wrote:
>
>> Is there a modern best practice for reading non-trivial HTML mails? I
>> know about shr, but it often fails.
>
> How about K H (gnus-article-browse-html-article)?
--------
View "text/html" parts of the current article with a WWW browser.
Inline images embedded in a message using the cid scheme, as they are
generally considered to be safe, will be processed properly.
The message header is added to the beginning of every html part unless
the prefix argument ARG is given.
If you always want to display HTML parts in the browser, set
‘mm-text-html-renderer’ to nil.
--------
Setting (setq mm-text-html-renderer nil) works, but it will open *all*
mails in the browser.
So I tried with a local variable:
--------
(defun my-gnus-article-browse-html-article ()
""
(interactive)
(let ((mm-text-html-renderer nil))
(gnus-article-browse-html-article)))
--------
-> this blocks ("waiting for external displayer to die...")
Next I tried:
--------
(add-to-list 'mm-text-html-renderer-alist
'(ff . browse-url-firefox-new-tab))
(defun my-gnus-article-browse-html-article ()
""
(interactive)
(let ((mm-text-html-renderer 'ff))
(gnus-article-browse-html-article)))
--------
-> this gives an error like
shell-command-to-string: Wrong type argument: characterp, #<buffer
*mm*-455001>
Finally I tried to create a new thread to get around the blocking
problem:
--------
(defun my-gnus-article-browse-html-article ()
""
(interactive)
(make-thread
(lambda ()
(let ((mm-text-html-renderer nil))
(gnus-article-browse-html-article)))))
--------
This works better than the first solution, but it doesn't work perfectly
(blocks for some seconds, saves the mail multiple times and opens it
multiple times in the browser).
Any idea?
Thanks and Best Regards,
--
Felix Natter
next prev parent reply other threads:[~2021-02-06 21:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 13:39 Felix Natter
2021-02-06 14:03 ` Andreas Schwab
2021-02-06 21:33 ` Felix Natter [this message]
2021-02-06 21:54 ` Adam Sjøgren
2021-02-07 9:36 ` Felix Natter
2021-02-07 12:50 ` Adam Sjøgren
2021-02-13 11:34 ` Felix Natter
2021-02-13 17:30 ` Adam Sjøgren
2021-02-08 11:05 ` Eric S Fraga
2021-02-08 11:44 ` Emanuel Berg
2021-02-08 11:58 ` Eric S Fraga
2021-02-08 12:12 ` Andreas Schwab
2021-02-08 15:06 ` Emanuel Berg
2021-02-06 23:19 ` Eric Abrahamsen
2021-05-26 14:08 ` Steinar Bang
2021-02-07 10:23 ` Valtteri Vuorikoski
2021-02-09 22:02 ` Adam Sjøgren
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1lsq3tt.fsf@gmx.net \
--to=fnatter@gmx.net \
--cc=ding@gnus.org \
--cc=schwab@linux-m68k.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.
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 NNTP newsgroup(s).