From 286d44644c49bfb6c71a559fb3dad15516d9f465 Mon Sep 17 00:00:00 2001 From: Philipp Takacs Date: Tue, 8 Feb 2022 11:16:48 +0100 Subject: [PATCH 2/2] repl set argv0 of showmimeproc to mhreplyfmt. This allows to have diffrent config for showmimeproc for replies. --- man/repl.man | 25 +++++++++++++------------ uip/replsbr.c | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/man/repl.man b/man/repl.man index fc1935fc..3162db8c 100644 --- a/man/repl.man +++ b/man/repl.man @@ -75,7 +75,16 @@ for details). To decode MIME messages .B repl pipe the message through -.IR showmimeproc . +.IR showmimeproc +by default. +To allow diffrent config the +.IR showmimeproc +will be called as +.IR mhreplyfmt . +So the config will be prefixed with mhreplyfmt instand of mhshow. +For example mhreplyfmt-show-text/html (see +.IR mhshow (1) +for details) is used to display a html mail. This can be disabled with the .B \-nofixmime switch. @@ -526,6 +535,8 @@ is checked. ^Msg\-Protect:~^To set mode when creating a new message (draft) ^fileproc:~^Program to refile the message ^showmimeproc:~^Program to show non-text (MIME) messages +^mhreplyfmt-charset-~^Template for environment to render character sets +^mhreplyfmt-show-*~^Template for displaying contents ^mhlproc:~^Program to filter message being replied-to ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions .fi @@ -536,6 +547,7 @@ is checked. .IR mhbuild (1), .IR send (1), .IR whatnow (1) +.IR mhshow (1) .PP .I %docdir%/contrib/replaliases .SH DEFAULTS @@ -589,14 +601,3 @@ don't call it since .B repl won't run it. -.PP -The -.RB \-fixmime -switch causes repl to pipe the message through -.IR showmimeproc . -If the -.IR showmimeproc -is configured to display listing prior a mime part, these listing will end up in the draft. -There might also be some unexpected behaviors, when the -.IR showmimeproc -is configured to display the content externel (i.e. open a browser to display html). diff --git a/uip/replsbr.c b/uip/replsbr.c index d2bab72f..477f8814 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -519,6 +519,7 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc, bool fixmime) * because we never call arglist_free(). But if we ever change * that be sure to use getcpy() for the extra arguments. */ + mhshowargs[0] = "mhreplyfmt"; mhshowargs[argnum++] = "-file"; mhshowargs[argnum++] = "-"; mhshowargs[argnum++] = "-concat"; -- 2.30.2