nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatic decode mime in repl


From: David Levine
Subject: Re: automatic decode mime in repl
Date: Fri, 11 Feb 2022 18:25:30 +0000

Philipp wrote:

> All I did was clone the repo, build it and run ``make check''. The
> hole time ``par'' wasn't installed. The build creates etc/mhn.defaults
> with the wrong mhbuild-convert-text entry.

Here is the mhn.defaults.sh code that puts par in mhn.defaults:
    if [ -n `$SEARCHPROG "$SEARCHPATH" par` ]; then
        textfmt=' | par 64'
        replfmt=" | sed 's/^\(.\)/> \1/; s/^$/>/;' | par 64"
SEARCHPROG is etc/mhn.find.sh.  SEARCHPATH is your PATH.  If you
want to help us track down this issue, would you please:
  1. cd to your cloned nmh directory
  2. execute etc/mhn.defaults.sh "$PATH" etc/mhn.find.sh and pipe
     the output through:  grep 'par '
using whatever commands are appropriate for your shell, e.g., for bash:
  cd (your nmh directory)
  etc/mhn.defaults "$PATH" etc/mh.find.sh | grep 'par '
And let us (or me) know the result.  Those commands will not modify
anything in your nmh directory hierarchy.

> As a _m_mh user I don't have the -convertargs switch.

You submitted a patch to nmh.  I'm not sure what mmh has to do with
any of this.  Are you asking for an nmh enhancement to support mmh?

> It looks like the -convertargs switch and the convert
> interface are only there to allow repl decoding mime.

More than just decoding mime content, convertargs provides an
interface to support conversion of any content when replying.

> But to decode mime messages there is a feature in nmh which was there
> before convertargs: mhshow. All my patch does is call mhshow and pipe
> the mail through it. Nothing more and nothing less. By this way you
> get mhshow to decode mime and all of it's features.

And all of its drawbacks.

> > I'm trying to understand how nmh could benefit from your patch.
>
> Have an easy to use, enable by default and sane way to reply to mime
> messages.

It doesn't work for me.  There are other issues, likely to do with
other configuration in my setup.  But if I run into issues, I should
expect that other people will, too.

> This patch doesn't handle URLs at all. mhshow will print them as is to
> stdout. After that mhl will add the '> ' and linebreaks. As said in the
> other mail, this is the default behavior of repl. This has nothing to do
> with my patch.

With your patch, URLs break for me.  I can look at fixing that somewhere
else, but then this isn't true for me:

> Under a easy to use and enable by default solution I understand something
> the user needs at most one switch to use this in a sane way. No aliases
> or editing of the profile, no requirement to manuall call mhbuild (or
> anything else) and no convenience shell file with aliases.

. . .

> There where already two ways mentioned in this thread how
> this could be fixed.

I missed them, and just went and searched and didn't find them.  Would
you summarize for me, please?

As far as using convertargs instead of your patch, doing this seems to
get close to the same result for me:

  1. add to my profile:
  mhbuild-convert-text/html: charset="%{charset}"; mhl -nomoreproc
-noclear -width 999999 %F | mhshow -file - -concat | /bin/w3m -dump
${charset:+-I} ${charset:+"$charset"} -T text/html | sed 's/^\(.\)/>
\1/; s/^$/>/;' | par 64
  2. rtm [msg]

I would rather do that then add new code to nmh that doesn't seem
like a complete solution.

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]