* Inline view of HTML emails
@ 2020-11-19 16:14 Robert Winkler
2020-11-26 22:31 ` [sup] " Iain Parris
0 siblings, 1 reply; 3+ messages in thread
From: Robert Winkler @ 2020-11-19 16:14 UTC (permalink / raw)
To: The Sup email client
[-- Attachment #1.1: Type: text/plain, Size: 196 bytes --]
Hi,
many people send their mails in HTML format only. Currently, I open them
in an external browser. But seeing them inline would be nice.
Is there a way how to do this?
Best regards,
Robert
[-- Attachment #1.2: Type: text/html, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup] Inline view of HTML emails
2020-11-19 16:14 Inline view of HTML emails Robert Winkler
@ 2020-11-26 22:31 ` Iain Parris
2020-11-27 0:46 ` Robert Winkler
0 siblings, 1 reply; 3+ messages in thread
From: Iain Parris @ 2020-11-26 22:31 UTC (permalink / raw)
To: Robert Winkler; +Cc: The Sup email client
Hi Robert,
Excerpts from Robert Winkler's message of 2020-11-19 08:14:45 -0800:
> many people send their mails in HTML format only. Currently, I open them
> in an external browser. But seeing them inline would be nice.
> Is there a way how to do this?
A mime-decode hook could accomplish this.
See:
<https://github.com/sup-heliotrope/sup/wiki/Viewing-Attachments#decoding-attachments>.
You would need w3m installed, and to create the file
~/.sup/hooks/mime-decode.rb containing contents as above.
Another alternative (but which wouldn't display the HTML inline) is to
create a mailcap file ~/.mailcap containing:
text/html; /usr/bin/w3m -T text/html %s; needsterminal; description=HTML Text; nametemplate=%s.html
With this alternative, pressing enter on a .html file would display it
in w3m, instead of launching a desktop GUI browser.
Kind regards,
Iain
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup] Inline view of HTML emails
2020-11-26 22:31 ` [sup] " Iain Parris
@ 2020-11-27 0:46 ` Robert Winkler
0 siblings, 0 replies; 3+ messages in thread
From: Robert Winkler @ 2020-11-27 0:46 UTC (permalink / raw)
To: The Sup email client
[-- Attachment #1.1: Type: text/plain, Size: 1339 bytes --]
Hi Iain,
Thanks again! I added the following code
require 'shellwords'
unless sibling_types.member? "text/plain"
case content_type
when "text/html"
`/usr/bin/w3m -dump -T #{content_type} #{Shellwords.escape
filename}`
end
end
in a new hook ~/.sup/hooks/mime-decode.rb
Let's see how it works.
Best regards,
Robert
On Thursday, 26 November 2020 at 16:31:09 UTC-6 ipv2...@parris.org wrote:
> Hi Robert,
>
> Excerpts from Robert Winkler's message of 2020-11-19 08:14:45 -0800:
> > many people send their mails in HTML format only. Currently, I open them
> > in an external browser. But seeing them inline would be nice.
> > Is there a way how to do this?
>
> A mime-decode hook could accomplish this.
>
> See:
> <
> https://github.com/sup-heliotrope/sup/wiki/Viewing-Attachments#decoding-attachments
> >.
>
> You would need w3m installed, and to create the file
> ~/.sup/hooks/mime-decode.rb containing contents as above.
>
> Another alternative (but which wouldn't display the HTML inline) is to
> create a mailcap file ~/.mailcap containing:
>
> text/html; /usr/bin/w3m -T text/html %s; needsterminal; description=HTML
> Text; nametemplate=%s.html
>
> With this alternative, pressing enter on a .html file would display it
> in w3m, instead of launching a desktop GUI browser.
>
> Kind regards,
> Iain
>
[-- Attachment #1.2: Type: text/html, Size: 2272 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-27 0:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 16:14 Inline view of HTML emails Robert Winkler
2020-11-26 22:31 ` [sup] " Iain Parris
2020-11-27 0:46 ` Robert Winkler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox