From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SNbfGjGfu19CUQAA0tVLHw (envelope-from ) for ; Mon, 23 Nov 2020 11:38:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gBe7FjGfu18BVAAAB5/wlQ (envelope-from ) for ; Mon, 23 Nov 2020 11:38:25 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AD8509404D3 for ; Mon, 23 Nov 2020 11:38:24 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E62CE28C64; Mon, 23 Nov 2020 06:38:17 -0500 (EST) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by mail.notmuchmail.org (Postfix) with ESMTPS id 62C0E203D7 for ; Mon, 23 Nov 2020 06:38:15 -0500 (EST) Received: by mail-qt1-x830.google.com with SMTP id m65so13023310qte.11 for ; Mon, 23 Nov 2020 03:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eri2/a/+tzLfy5JoJ4VRL6uCidLg4QUnshPvfazO4Jw=; b=pofhuM27KDQ0fBtmC5kSBXqK8cZ5bZe5uT3XG7LFfogXu9ssOcdW3crYQIv1qF3wvu EcG5LQeCDyWHokPs8spXHiTyw12kK0uBVb6LOV97QudbedOhyEYSdL7LQayhq7QwhCKy vNHmsjauZR14hG7TPa6C7tLYUE2DtgciLkZLvLQMbErUEBLQJMpBo9RQNeKH8NpBA256 4pG6iycYuTniY8eSYS34AgZdnceOSn9VdK2pyB/d1EjUKDDzSo2btR/M4y43WhvWA5Or TL/lVgpFA8tz/KufUzOJMCZTWkc0L4h5/PAS6P3Bn3oib34Fok/zSUORxOTEcSsBrfQU zhSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eri2/a/+tzLfy5JoJ4VRL6uCidLg4QUnshPvfazO4Jw=; b=ZGfWU6Fh1FXr2iccQDl8d/1rP+qbCIMWvdKulocxraOzTGCDAS1hqvkufNyO7RMoGV MY+S0u5XvoRTl4ntUhQWTtEb9S4aXQcFpRy0xggBqBRMnkPOkwDxUNPsysdjdiA9q0lO pJw7ZTEGg0oWjEdGK6lTyjMevkEDGaN5GCBEfFdQdBsL6LDjtvnLdc5u7k0ktGmr/7di xjVONJrHcCfjb4BKFLalqYB0XG2uQK4nA+bPF/UXmnCjJJv6meyd1tVZIUxSMN8iZLGM dKePZu5wE2RDRsWEGvNBiT/FeKuc4RawAbocxWdqD3/6q+CNo9GsP/uYBW39oM0ZzimI +NLw== X-Gm-Message-State: AOAM533WXzp6uN+jkdr/8g/CVSxLGgyxOLx0a50KFTf4HIiPG1SwTtI1 qGEObT3oFU0Dw+/enYO50+obxEz653dHHtSlS3AAReWDoL6JhmJB X-Google-Smtp-Source: ABdhPJwoZTxlqqBOv/pjypdRm72IdgcemFfa6YzjY56i2PjtM9Rytpg/i8/GUdDWPjtZqj8eW+0n1LCcw+2vP6EIyFM= X-Received: by 2002:a05:622a:24a:: with SMTP id c10mr28722853qtx.52.1606131494407; Mon, 23 Nov 2020 03:38:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Wenlong Dai Date: Mon, 23 Nov 2020 22:37:38 +1100 Message-ID: Subject: Re: question: how to change file extension generated by (notmuch-show-view-part) To: Tomi Ollila Message-ID-Hash: 5XMXWPIYQH4LHORYQCV4QX4ZPFQ37YEM X-Message-ID-Hash: 5XMXWPIYQH4LHORYQCV4QX4ZPFQ37YEM X-MailFrom: whudwl@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: notmuch@notmuchmail.org X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============4759109165184447110==" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=pofhuM27; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 1.09 X-TUID: wwhAigk6RdP/ --===============4759109165184447110== Content-Type: multipart/alternative; boundary="0000000000002fd47905b4c4a1d9" --0000000000002fd47905b4c4a1d9 Content-Type: text/plain; charset="UTF-8" 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 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 --0000000000002fd47905b4c4a1d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I created ~/.mailcap and = put the following line in it:=C2=A0
t= ext/html; links2 -g %s; test=3Dtest -n "$DISPLAY"

I did= not change=C2=A0my configuration and now I cannot reproduce the behaviour = however I try.=C2=A0

On Mon, 23 Nov 2020 at 22:29, Tomi Ollila <tomi.ollila@iki.fi> wrote:
On Mon, Nov 23 2020, W= enlong 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 .sh= tml
> 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 unnecessar= y 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
=C2=A0 '((shr . mm-shr)
=C2=A0 =C2=A0 (w3m . mm-inline-text-html-render-with-w3m)
=C2=A0 =C2=A0 (w3m-standalone . mm-inline-text-html-render-with-w3m-standal= one)
=C2=A0 =C2=A0 (gnus-w3m . gnus-article-html)
=C2=A0 =C2=A0 (links mm-inline-render-with-file
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mm-links-remove-leading-blank
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"links" "-dump"= ; file)
=C2=A0 =C2=A0 (lynx mm-inline-render-with-stdin nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "lynx" "-dump" "= ;-force_html" "-stdin" "-nolist")
=C2=A0 =C2=A0 (html2text mm-inline-render-with-function html2text))
=C2=A0 "The attributes of renderer types for text/html.")
-->8---->8---->8---->8---->8---->8---->8---->8----&= gt;8---->8--

Tomi


--
Kind Regards,
Wenlong Dai

--0000000000002fd47905b4c4a1d9-- --===============4759109165184447110== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4759109165184447110==--