From: Ian Zimmerman Date: Fri, 16 Dec 2016 18:42:36 +0000 (-0800) Subject: docs: Describe the new message ranges X-Git-Tag: neomutt-20170128~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a47a170a14d747da9c23cbe22f4cb6979c1f4d5;p=neomutt docs: Describe the new message ranges Closes: #311 --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 0a520e0b1..7f283e4b3 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -5860,7 +5860,11 @@ shows several ways to select messages. ~L EXPRmessages either originated or received by EXPR %L GROUPmessage either originated or received by any member of GROUP ~lmessages addressed to a known mailing list -~m [MIN]-[MAX]messages in the range MIN to MAX *) +~m [MIN]-[MAX]messages with numbers in the range MIN to MAX ***) +~m <[MAX]messages with numbers less than MAX ***) +~m >[MIN]messages with numbers greater than MIN ***) +~m [M]just message number M ***) +~m [MIN],[MAX]messages with offsets (from selected message) in the range MIN to MAX ***) ~n [MIN]-[MAX]messages with a score in the range MIN to MAX *) ~Nnew messages ~Oold messages @@ -5907,6 +5911,12 @@ Where EXPR is a regular expression + + ***) The message number ranges (introduced by ~m) + are even more general and powerful than the other + types of ranges. Read on and see below. + + Special attention has to be payed when using regular expressions inside of patterns. Specifically, Mutt's parser for these patterns will strip @@ -5967,6 +5977,75 @@ string. This example matches messages whose senders are known aliases. + + Message Ranges + + + If a message number range (from now on: MNR) contains a comma (,), + it is a relative MNR. That means the numbers denote + offsets from the highlighted message. For + example: + + + + + PatternExplanation + + + ~m -2,2Previous 2, highlighted and next 2 emails + ~m 0,1Highlighted and next email + + +
+ + In addition to numbers, either side of the range can also contain one + of the special characters (shortcuts).^$. The meaning is: + + + MNR Shortcuts + + + ShortcutExplanationExampleMeaning + + + .Current / Highlighted~m -3,.Previous 3 emails plus the highlighted one + $Last~m .,$Highlighted email and all the later ones + ^First~m ^,1Highlighted, next and all preceding ones + + +
+ + Lastly, you can also leave either side of the range blank, to make it + extend as far as possible. For example, ~m ,1 has + the same meaning as the last example in . +
+ + Otherwise, if a MNR doesn't contain a comma, the + meaning is similar to other ranges, except that the shortcuts are + still available. Examples: + + + + + PatternExplanation + + + ~m 3-10Emails 3 to 10 + ~m -10Emails 1 to 10 + ~m 10-Emails 10 to last + ~m <3First and second email + ~m ^-2First and second email + ~m >1Everything but first email + ~m 2-$Everything but first email + ~m 2Just the second email + + +
+
+ +
+