diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 13:10:44 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 13:10:44 +0300 |
commit | cf8100abb84b8ba92f6a3d33c60c2dbce950e119 (patch) | |
tree | 356777c49e88c176fe900a0877e79c91de667077 | |
parent | e8c4245e1a4c8e2cb130cfcefa4474909bcb7906 (diff) | |
download | mailutils-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'
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | doc/texinfo/programs/mail.texi | 14 | ||||
-rw-r--r-- | mail/mailline.c | 2 | ||||
-rw-r--r-- | mail/msgset.y | 8 |
4 files changed, 23 insertions, 11 deletions
@@ -1,4 +1,4 @@ | |||
1 | GNU mailutils NEWS -- history of user-visible changes. 2019-09-03 | 1 | GNU mailutils NEWS -- history of user-visible changes. 2019-09-11 |
2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2019 Free Software Foundation, Inc. |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
@@ -28,6 +28,14 @@ Example configuration (pop3s server): | |||
28 | The --test option takes optional argument: name of the tty or file to | 28 | The --test option takes optional argument: name of the tty or file to |
29 | use for reporting. | 29 | use for reporting. |
30 | 30 | ||
31 | |||
32 | |||
33 | ** fix the semantics of 'hold' and 'keepsave' variables | ||
34 | |||
35 | ** New message type specification ":s" | ||
36 | |||
37 | Selects messages in state 'saved'. | ||
38 | |||
31 | 39 | ||
32 | Version 3.7 - 2019-06-21 | 40 | Version 3.7 - 2019-06-21 |
33 | 41 | ||
diff --git a/doc/texinfo/programs/mail.texi b/doc/texinfo/programs/mail.texi index b4c68a100..accd89148 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: | |||
432 | @table @samp | 432 | @table @samp |
433 | @item d | 433 | @item d |
434 | Deleted messages. | 434 | Deleted messages. |
435 | @item :n | 435 | @item n |
436 | New messages. | 436 | New messages. |
437 | @item :o | 437 | @item o |
438 | Old messages (any message not in state @samp{read} or @samp{new}). | 438 | Old messages (any message not in state @samp{read} or @samp{new}). |
439 | @item :r | 439 | @item r |
440 | Messages in state @samp{read}. | 440 | Messages in state @samp{read}. |
441 | @item :u | 441 | @item u |
442 | Messages in state @samp{unread}. | 442 | Messages in state @samp{unread}. |
443 | @item :t | 443 | @item t |
444 | Selects all tagged messages. | 444 | Selects all tagged messages. |
445 | @item :T | 445 | @item T |
446 | Selects all untagged messages. | 446 | Selects all untagged messages. |
447 | @item s | ||
448 | Selects all messages in state @samp{saved}. | ||
447 | @end table | 449 | @end table |
448 | 450 | ||
449 | @item [@var{header}:]/@var{string}[/] | 451 | @item [@var{header}:]/@var{string}[/] |
diff --git a/mail/mailline.c b/mail/mailline.c index 647cb1e17..d6cef37df 100644 --- a/mail/mailline.c +++ b/mail/mailline.c | |||
@@ -690,7 +690,7 @@ msgtype_generator (const char *text, int state) | |||
690 | { | 690 | { |
691 | /* Allowed message types, plus '/'. The latter can folow a colon, | 691 | /* Allowed message types, plus '/'. The latter can folow a colon, |
692 | meaning body lookup */ | 692 | meaning body lookup */ |
693 | static char types[] = "dnorTtu/"; | 693 | static char types[] = "dnorsTtu/"; |
694 | static int i; | 694 | static int i; |
695 | char c; | 695 | char c; |
696 | 696 | ||
diff --git a/mail/msgset.y b/mail/msgset.y index 8011dc779..6f31325dd 100644 --- a/mail/msgset.y +++ b/mail/msgset.y | |||
@@ -166,7 +166,7 @@ msg : header REGEXP /* /.../ */ | |||
166 | } | 166 | } |
167 | | TYPE /* :n, :d, etc */ | 167 | | TYPE /* :n, :d, etc */ |
168 | { | 168 | { |
169 | if (strchr ("dnorTtu", $1) == NULL) | 169 | if (strchr ("dnorsTtu", $1) == NULL) |
170 | { | 170 | { |
171 | yyerror (_("unknown message type")); | 171 | yyerror (_("unknown message type")); |
172 | YYERROR; | 172 | YYERROR; |
@@ -746,12 +746,14 @@ select_type (mu_message_t msg, void *closure) | |||
746 | return mu_attribute_is_seen (attr); | 746 | return mu_attribute_is_seen (attr); |
747 | case 'r': | 747 | case 'r': |
748 | return mu_attribute_is_read (attr); | 748 | return mu_attribute_is_read (attr); |
749 | case 'u': | 749 | case 's': |
750 | return !mu_attribute_is_read (attr); | 750 | return mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_SAVED); |
751 | case 't': | 751 | case 't': |
752 | return mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED); | 752 | return mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED); |
753 | case 'T': | 753 | case 'T': |
754 | return !mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED); | 754 | return !mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED); |
755 | case 'u': | ||
756 | return !mu_attribute_is_read (attr); | ||
755 | } | 757 | } |
756 | return 0; | 758 | return 0; |
757 | } | 759 | } |