[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] The -prefer argument to mhshowsca for versison 1.7
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] The -prefer argument to mhshowsca for versison 1.7 |
Date: |
Wed, 30 Aug 2017 12:06:22 +0100 |
Hi Ken,
> > mhshow: -prefer text/plain
> >
> > How can I override that to get the default behavior for a single
> > invocation of mhshow?
>
> Hm. It doesn't look like that is currently possible. There should
> have been a -noprefer switch that would zero out the current prefer
> list
Or the design should have been the reverse: Specify the most preferred
last. Then my ~/.mh_profile of
mhshow: -prefer text/html -prefer text/rtf -prefer text/plain
can be temporarily overridden with `mhshow -prefer text/html' at the
command line without having to re-specify the relative preference of the
others.
I don't think the man page makes clear how multiple -prefer options
interact?
I've tried some tests. The email has text/stN in ascending order.
mhlist correctly flips the 42.3.* alternatives around.
42 multipart/mixed
1 text/st1
2 text/st2
3 multipart/alternative
1 text/st5
2 text/st4
3 text/st3
4 text/st2
4 text/st3
So I've two st2, and two st3.
`mhstore', the default, is correct.
subtype 1
subtype 2 before
subtype 5
subtype 3 after
`mhstore -prefer text/st2' switches st5 for st2, correct.
subtype 1
subtype 2 before
subtype 2 alternative
subtype 3 after
`mhstore -prefer text/st3' similarly switches st5 for st3, correct.
subtype 1
subtype 2 before
subtype 3
subtype 3 after
`mhstore -prefer text/st4 -prefer text/st5' has the first preference be
most important; I get st4.
subtype 1
subtype 2 before
subtype 4
subtype 3 after
`mhstore -prefer text/st5 -prefer text/st4', the reverse, has st5 win.
Just checking it doesn't matter if it's the default anyway.
subtype 1
subtype 2 before
subtype 5
subtype 3 after
`mhstore -prefer text/st3 -prefer text/st4' doesn't
mention st5. The first, st3, still wins.
subtype 1
subtype 2 before
subtype 3
subtype 3 after
`mhstore -prefer text', with no subtype specified, gives st5. The
implementation moves matching alternatives, i.e. all, in the order
they're encountered into a new list and then tacks on the non-matching
ones in their original order. So this moves all of st{5,4,3,2} and
changes nothing.
subtype 1
subtype 2 before
subtype 5
subtype 3 after
I guess this means `-prefer text' could be used to shuffle whatever text
is available ahead of slow audio/*.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy