summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2019-09-11 10:10:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2019-09-11 10:10:44 (GMT)
commitcf8100abb84b8ba92f6a3d33c60c2dbce950e119 (patch) (side-by-side diff)
tree356777c49e88c176fe900a0877e79c91de667077
parente8c4245e1a4c8e2cb130cfcefa4474909bcb7906 (diff)
downloadmailutils-cf8100abb84b8ba92f6a3d33c60c2dbce950e119.tar.gz
mailutils-cf8100abb84b8ba92f6a3d33c60c2dbce950e119.tar.bz2
mail: new message specification :s
* NEWS: Update. * doc/texinfo/programs/mail.texi: Update. * mail/mailline.c (msgtype_generator): Recogize 's' * mail/msgset.y (select_type): Recognize 's'
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--NEWS12
-rw-r--r--doc/texinfo/programs/mail.texi14
-rw-r--r--mail/mailline.c2
-rw-r--r--mail/msgset.y8
4 files changed, 24 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index 50eadb8..f23851e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2019-09-03
+GNU mailutils NEWS -- history of user-visible changes. 2019-09-11
Copyright (C) 2002-2019 Free Software Foundation, Inc.
See the end of file for copying conditions.
@@ -27,7 +27,15 @@ Example configuration (pop3s server):
The --test option takes optional argument: name of the tty or file to
use for reporting.
-
+
+* mail
+
+** fix the semantics of 'hold' and 'keepsave' variables
+
+** New message type specification ":s"
+
+Selects messages in state 'saved'.
+
Version 3.7 - 2019-06-21
diff --git a/doc/texinfo/programs/mail.texi b/doc/texinfo/programs/mail.texi
index b4c68a1..accd891 100644
--- a/doc/texinfo/programs/mail.texi
+++ b/doc/texinfo/programs/mail.texi
@@ -432,18 +432,20 @@ All messages of type @var{t}, where @var{t} can be any of:
@table @samp
@item d
Deleted messages.
-@item :n
+@item n
New messages.
-@item :o
+@item o
Old messages (any message not in state @samp{read} or @samp{new}).
-@item :r
+@item r
Messages in state @samp{read}.
-@item :u
+@item u
Messages in state @samp{unread}.
-@item :t
+@item t
Selects all tagged messages.
-@item :T
+@item T
Selects all untagged messages.
+@item s
+Selects all messages in state @samp{saved}.
@end table
@item [@var{header}:]/@var{string}[/]
diff --git a/mail/mailline.c b/mail/mailline.c
index 647cb1e..d6cef37 100644
--- a/mail/mailline.c
+++ b/mail/mailline.c
@@ -690,7 +690,7 @@ msgtype_generator (const char *text, int state)
{
/* Allowed message types, plus '/'. The latter can folow a colon,
meaning body lookup */
- static char types[] = "dnorTtu/";
+ static char types[] = "dnorsTtu/";
static int i;
char c;
diff --git a/mail/msgset.y b/mail/msgset.y
index 8011dc7..6f31325 100644
--- a/mail/msgset.y
+++ b/mail/msgset.y
@@ -166,7 +166,7 @@ msg : header REGEXP /* /.../ */
}
| TYPE /* :n, :d, etc */
{
- if (strchr ("dnorTtu", $1) == NULL)
+ if (strchr ("dnorsTtu", $1) == NULL)
{
yyerror (_("unknown message type"));
YYERROR;
@@ -746,12 +746,14 @@ select_type (mu_message_t msg, void *closure)
return mu_attribute_is_seen (attr);
case 'r':
return mu_attribute_is_read (attr);
- case 'u':
- return !mu_attribute_is_read (attr);
+ case 's':
+ return mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_SAVED);
case 't':
return mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED);
case 'T':
return !mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED);
+ case 'u':
+ return !mu_attribute_is_read (attr);
}
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.