]> diplodocus.org Git - nmh/commitdiff
Change the priority ordering for multiple -prefer switches
authorPaul Fox <pgf@foxharp.boston.ma.us>
Sat, 2 Sep 2017 13:13:44 +0000 (09:13 -0400)
committerPaul Fox <pgf@foxharp.boston.ma.us>
Mon, 4 Sep 2017 21:13:39 +0000 (17:13 -0400)
Interpreting multiple -prefer switches in ascending priority
order allows the command line to override the user's profile.

man/mhlist.man
man/mhshow.man
man/mhstore.man
uip/mhparse.c

index 021d5d84883b0e9be69d74a12a134765e682a167..89aeeb86d5a781d26bf46c0cb1976e156e99eae0 100644 (file)
@@ -174,7 +174,7 @@ the reverse order of their placement in the message.  The listing,
 therefore, is in decreasing order of preference, as defined in RFC
 2046.  The
 .B \-prefer
 therefore, is in decreasing order of preference, as defined in RFC
 2046.  The
 .B \-prefer
-switch can be used (one or more times, in order of descending
+switch can be used (one or more times, in order of ascending
 preference) to let MH know which content types from a
 multipart/alternative MIME part are preferred by the user, in order to
 override the default preference order.  Thus, when viewed by
 preference) to let MH know which content types from a
 multipart/alternative MIME part are preferred by the user, in order to
 override the default preference order.  Thus, when viewed by
index 93225290531fd46236080eb970479f624a563852..922c5bf7de35340c74c10878daeafae822fe024e 100644 (file)
@@ -206,7 +206,7 @@ In the absence of
 will select the "best" displayable subpart from multipart/alternative
 content.  The
 .B \-prefer
 will select the "best" displayable subpart from multipart/alternative
 content.  The
 .B \-prefer
-switch can be used (one or more times, in order of descending
+switch can be used (one or more times, in order of ascending
 preference) to let MH know which content types from a
 multipart/alternative MIME part are preferred by the user, in order to
 override the default selection for display.  For example, mail is
 preference) to let MH know which content types from a
 multipart/alternative MIME part are preferred by the user, in order to
 override the default selection for display.  For example, mail is
@@ -230,7 +230,11 @@ faithful" position.  Thus, when viewed by
 the ordering of multipart/alternative parts will appear to change when
 invoked with or without various
 .B \-prefer
 the ordering of multipart/alternative parts will appear to change when
 invoked with or without various
 .B \-prefer
-switches.
+switches.  Since the last of multiple 
+.B \-prefer
+options "wins", a
+.B \-prefer
+on the command line will override any in a profile entry.
 .SS "Unseen Sequence"
 If the profile entry \*(lqUnseen\-Sequence\*(rq is present and
 non-empty, then
 .SS "Unseen Sequence"
 If the profile entry \*(lqUnseen\-Sequence\*(rq is present and
 non-empty, then
index 9c99f515f1f044c1cfc45f6619d8f4d84e1c8619..a5087077568ff19a2ba1a941d4be87c6d4b71f46 100644 (file)
@@ -158,6 +158,10 @@ but is also implemented in
 and
 .B mhstore
 to make common part-numbering possible across all three programs.
 and
 .B mhstore
 to make common part-numbering possible across all three programs.
+The last of multiple
+.B \-prefer
+switches will have the highest priority.  This allows the command line
+switches to override profile entries.
 See
 .IR mhlist (1)
 and
 See
 .IR mhlist (1)
 and
index 4d8e91e7ea6103b2acc8518b3bf09bbc3df245a3..fda2de0b3ed15794226e89bdff13dcf143a5a207 100644 (file)
@@ -1367,7 +1367,7 @@ static void
 prefer_parts(CT ct)
 {
     int i;
 prefer_parts(CT ct)
 {
     int i;
-    for (i = npreferred-1; i >= 0; i--)
+    for (i = 0; i < npreferred; i++)
        move_preferred_part(ct, preferred_types[i], preferred_subtypes[i]);
 }
 
        move_preferred_part(ct, preferred_types[i], preferred_subtypes[i]);
 }