unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* question: how to change file extension generated by (notmuch-show-view-part)
@ 2020-11-23  7:53 Wenlong Dai
  2020-11-23 10:43 ` David Bremner
  2020-11-23 11:29 ` Tomi Ollila
  0 siblings, 2 replies; 5+ messages in thread
From: Wenlong Dai @ 2020-11-23  7:53 UTC (permalink / raw)
  To: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 500 bytes --]

I've been trying to use links2 to view html part of messages.
The problem I'm encountering is that, the part would be saved as
/tmp/xxx/xxx.shtml and
passed on to links2, and it seems links2 doesn't recognise the .shtml
extension.

netsurf works well with .shtml though.

But being stubborn as I am, I would like to know if I can make notmuch
output .html file instead?
I did a bit of research on shtml, seems it's completely unnecessary in this
case? why would notmuch choose this extension anyway?

[-- Attachment #1.2: Type: text/html, Size: 1432 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: question: how to change file extension generated by (notmuch-show-view-part)
  2020-11-23  7:53 question: how to change file extension generated by (notmuch-show-view-part) Wenlong Dai
@ 2020-11-23 10:43 ` David Bremner
  2020-11-23 10:56   ` Wenlong Dai
  2020-11-23 11:29 ` Tomi Ollila
  1 sibling, 1 reply; 5+ messages in thread
From: David Bremner @ 2020-11-23 10:43 UTC (permalink / raw)
  To: Wenlong Dai, notmuch

Wenlong Dai <whudwl@gmail.com> writes:

> I've been trying to use links2 to view html part of messages.
> The problem I'm encountering is that, the part would be saved as
> /tmp/xxx/xxx.shtml and
> passed on to links2, and it seems links2 doesn't recognise the .shtml
> extension.
>

I could not duplicate this with the message you sent to the list. Does
it happen with all html parts for you, or just some? If the latter, can
you share an example message?

I suspect emacs is taking taking the file name from the message, but I
don't know for sure.

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

* Re: question: how to change file extension generated by (notmuch-show-view-part)
  2020-11-23 10:43 ` David Bremner
@ 2020-11-23 10:56   ` Wenlong Dai
  0 siblings, 0 replies; 5+ messages in thread
From: Wenlong Dai @ 2020-11-23 10:56 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 1055 bytes --]

Thank you very much for your email.
I just tried this again but could not reproduce it either.
I guess it just happened to a very particular message in my inbox.
I was probably quite unlucky that my first try was on such a
peculiar message.
Now I couldn't remember what message I was looking at and I cannot find it
anymore.
I'll report back if I see the problem again.

On Mon, 23 Nov 2020 at 21:43, David Bremner <david@tethera.net> wrote:

> Wenlong Dai <whudwl@gmail.com> writes:
>
> > I've been trying to use links2 to view html part of messages.
> > The problem I'm encountering is that, the part would be saved as
> > /tmp/xxx/xxx.shtml and
> > passed on to links2, and it seems links2 doesn't recognise the .shtml
> > extension.
> >
>
> I could not duplicate this with the message you sent to the list. Does
> it happen with all html parts for you, or just some? If the latter, can
> you share an example message?
>
> I suspect emacs is taking taking the file name from the message, but I
> don't know for sure.
>
>

-- 
Kind Regards,
Wenlong Dai

[-- Attachment #1.2: Type: text/html, Size: 2242 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: question: how to change file extension generated by (notmuch-show-view-part)
  2020-11-23  7:53 question: how to change file extension generated by (notmuch-show-view-part) Wenlong Dai
  2020-11-23 10:43 ` David Bremner
@ 2020-11-23 11:29 ` Tomi Ollila
  2020-11-23 11:37   ` Wenlong Dai
  1 sibling, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2020-11-23 11:29 UTC (permalink / raw)
  To: Wenlong Dai, notmuch

On Mon, Nov 23 2020, Wenlong Dai wrote:

> I've been trying to use links2 to view html part of messages.
> The problem I'm encountering is that, the part would be saved as
> /tmp/xxx/xxx.shtml and
> passed on to links2, and it seems links2 doesn't recognise the .shtml
> extension.
>
> netsurf works well with .shtml though.
>
> But being stubborn as I am, I would like to know if I can make notmuch
> output .html file instead?
> I did a bit of research on shtml, seems it's completely unnecessary in this
> case? why would notmuch choose this extension anyway?

I could not find any reference to .shtml in notmuch emacs mua sources
... nor could I find such in the "message" sources
(zgrep ... in /usr/share/emacs/{version}/lisp/gnus/*.gz)
notmuch emacs mua is using doing many of the things.

How did you configure emacs to use links2/netsurf to view html parts ?

(/usr/share/emacs/{version}/lisp/gnus/mm-view.elc.gz defines these
to be known and how those are executed:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
(defvar mm-text-html-renderer-alist
  '((shr . mm-shr)
    (w3m . mm-inline-text-html-render-with-w3m)
    (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
    (gnus-w3m . gnus-article-html)
    (links mm-inline-render-with-file
           mm-links-remove-leading-blank
           "links" "-dump" file)
    (lynx mm-inline-render-with-stdin nil
          "lynx" "-dump" "-force_html" "-stdin" "-nolist")
    (html2text mm-inline-render-with-function html2text))
  "The attributes of renderer types for text/html.")
-->8---->8---->8---->8---->8---->8---->8---->8---->8---->8--

Tomi

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

* Re: question: how to change file extension generated by (notmuch-show-view-part)
  2020-11-23 11:29 ` Tomi Ollila
@ 2020-11-23 11:37   ` Wenlong Dai
  0 siblings, 0 replies; 5+ messages in thread
From: Wenlong Dai @ 2020-11-23 11:37 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: notmuch


[-- Attachment #1.1: Type: text/plain, Size: 2015 bytes --]

I created ~/.mailcap and put the following line in it:
text/html; links2 -g %s; test=test -n "$DISPLAY"

I did not change my configuration and now I cannot reproduce the behaviour
however I try.

On Mon, 23 Nov 2020 at 22:29, Tomi Ollila <tomi.ollila@iki.fi> wrote:

> On Mon, Nov 23 2020, Wenlong Dai wrote:
>
> > I've been trying to use links2 to view html part of messages.
> > The problem I'm encountering is that, the part would be saved as
> > /tmp/xxx/xxx.shtml and
> > passed on to links2, and it seems links2 doesn't recognise the .shtml
> > extension.
> >
> > netsurf works well with .shtml though.
> >
> > But being stubborn as I am, I would like to know if I can make notmuch
> > output .html file instead?
> > I did a bit of research on shtml, seems it's completely unnecessary in
> this
> > case? why would notmuch choose this extension anyway?
>
> I could not find any reference to .shtml in notmuch emacs mua sources
> ... nor could I find such in the "message" sources
> (zgrep ... in /usr/share/emacs/{version}/lisp/gnus/*.gz)
> notmuch emacs mua is using doing many of the things.
>
> How did you configure emacs to use links2/netsurf to view html parts ?
>
> (/usr/share/emacs/{version}/lisp/gnus/mm-view.elc.gz defines these
> to be known and how those are executed:
>
> --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
> (defvar mm-text-html-renderer-alist
>   '((shr . mm-shr)
>     (w3m . mm-inline-text-html-render-with-w3m)
>     (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
>     (gnus-w3m . gnus-article-html)
>     (links mm-inline-render-with-file
>            mm-links-remove-leading-blank
>            "links" "-dump" file)
>     (lynx mm-inline-render-with-stdin nil
>           "lynx" "-dump" "-force_html" "-stdin" "-nolist")
>     (html2text mm-inline-render-with-function html2text))
>   "The attributes of renderer types for text/html.")
> -->8---->8---->8---->8---->8---->8---->8---->8---->8---->8--
>
> Tomi
>


-- 
Kind Regards,
Wenlong Dai

[-- Attachment #1.2: Type: text/html, Size: 3202 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2020-11-23 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23  7:53 question: how to change file extension generated by (notmuch-show-view-part) Wenlong Dai
2020-11-23 10:43 ` David Bremner
2020-11-23 10:56   ` Wenlong Dai
2020-11-23 11:29 ` Tomi Ollila
2020-11-23 11:37   ` Wenlong Dai

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).