Custom notmuch-show for html?

classic Classic list List threaded Threaded
6 messages Options
William Casarin William Casarin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom notmuch-show for html?


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!
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom notmuch-show for html?

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!
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
William Casarin William Casarin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom notmuch-show for html?

Tomi Ollila <[hidden email]> 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
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
William Casarin William Casarin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom notmuch-show for html?

Tomi Ollila <[hidden email]> 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!
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom notmuch-show for html?

On Tue, Jul 25 2017, William Casarin wrote:

> Tomi Ollila <[hidden email]> 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!
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
William Casarin William Casarin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom notmuch-show for html?

Tomi Ollila <[hidden email]> 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
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Loading...