>    > I won't mind if the Subject stops being mangled (I use the
>    > list-post header for filtering). I also won't mind if the body
>    > stops being mangled
>
>I do, so let me ask:
>
>can I get List-Id easily inserted into scan output in a way that will
>make mh-e happy?

Given the current format language lacks string manipulation, it's a bit
hard to do it generically.  But ... I use scan.size, which is currently:

%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%5(size) \
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%>  \
%(decode{subject})%<{body}<<%{body}%>

This does close to what you want:

%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%5(size) \
%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
%<(zero)%17(unquote(decode(friendly{from})))%>  \
%<{list-id}%<(match nmh-workers)[nmh-workers] %>%>\
%(decode{subject})%<{body}<<%{body}%>

The key is this line:

%<{list-id}%<(match nmh-workers)[nmh-workers] %>%>\

What that means is:

If the list-id header is set, AND it contains the string nmh-workers,
then output the string "[nmh-workers] ".  You might find that objectionable
if the current subject string contains [nmh-workers], but fixing that is
left as an exercise to the reader.  Remember that fmttest exists now and
is your friend.

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to