unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Custom notmuch-show for html?
@ 2017-07-23 15:57 William Casarin
  2017-07-24 12:05 ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: William Casarin @ 2017-07-23 15:57 UTC (permalink / raw)
  To: notmuch, notmuch


Hey there,

I would like to never use emacs' slow html renderer when viewing
html-only email. What I want to do is pipe the html through:

  pandoc -f html -t plain

and then show the output of that. Right now I can do this with `. |` but
I can only do this after I open the email, which is not ideal.

What would be the best way to accomplish this?

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Custom notmuch-show for html?
  2017-07-23 15:57 Custom notmuch-show for html? William Casarin
@ 2017-07-24 12:05 ` Tomi Ollila
  2017-07-24 14:01   ` William Casarin
  0 siblings, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2017-07-24 12:05 UTC (permalink / raw)
  To: William Casarin, notmuch

On Sun, Jul 23 2017, William Casarin wrote:

> Hey there,
>
> I would like to never use emacs' slow html renderer when viewing
> html-only email. What I want to do is pipe the html through:
>
>   pandoc -f html -t plain
>
> and then show the output of that. Right now I can do this with `. |` but
> I can only do this after I open the email, which is not ideal.
>
> What would be the best way to accomplish this?

Writing one's own renderer function and pointing mm-text-html-renderer
to that (or something...)

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
mm-text-html-renderer is a variable defined in ‘mm-decode.el’.
Its value is ‘shr’

Documentation:
Render of HTML contents.
It is one of defined renderer types, or a rendering function.
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

If you try to work something on this (or anything), please report your
progress :D

Tomi

>
> Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Custom notmuch-show for html?
  2017-07-24 12:05 ` Tomi Ollila
@ 2017-07-24 14:01   ` William Casarin
  2017-07-26  5:06     ` William Casarin
  0 siblings, 1 reply; 6+ messages in thread
From: William Casarin @ 2017-07-24 14:01 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:
> Writing one's own renderer function and pointing mm-text-html-renderer
> to that (or something...)

This is what I was looking for, thanks.

> If you try to work something on this (or anything), please report your
> progress :D

Will do!

Cheers,
William

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Custom notmuch-show for html?
  2017-07-24 14:01   ` William Casarin
@ 2017-07-26  5:06     ` William Casarin
  2017-07-26  6:22       ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: William Casarin @ 2017-07-26  5:06 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:
> If you try to work something on this (or anything), please report your
> progress :D

I didn't really get far after I discovered how awesome emacs-w3m was.
pandoc plaintext output is pretty bad in comparison.

Thanks again!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Custom notmuch-show for html?
  2017-07-26  5:06     ` William Casarin
@ 2017-07-26  6:22       ` Tomi Ollila
  2017-07-26  6:54         ` William Casarin
  0 siblings, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2017-07-26  6:22 UTC (permalink / raw)
  To: William Casarin, notmuch

On Tue, Jul 25 2017, William Casarin wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>> If you try to work something on this (or anything), please report your
>> progress :D
>
> I didn't really get far after I discovered how awesome emacs-w3m was.
> pandoc plaintext output is pretty bad in comparison.

So, you set mm-text-html-renderer as 'w3m

?

Tomi

>
> Thanks again!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Custom notmuch-show for html?
  2017-07-26  6:22       ` Tomi Ollila
@ 2017-07-26  6:54         ` William Casarin
  0 siblings, 0 replies; 6+ messages in thread
From: William Casarin @ 2017-07-26  6:54 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:
> So, you set mm-text-html-renderer as 'w3m
>
> ?

Yeah, but I had to install w3m and install the w3m package before it
worked. The w3m-standalone one worked but was a bit slower and didn't seem
to work as well.

Cheers,
William

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-26  6:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-23 15:57 Custom notmuch-show for html? William Casarin
2017-07-24 12:05 ` Tomi Ollila
2017-07-24 14:01   ` William Casarin
2017-07-26  5:06     ` William Casarin
2017-07-26  6:22       ` Tomi Ollila
2017-07-26  6:54         ` William Casarin

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).