From patchwork Sat Oct 29 20:55:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: docs: man, online help, and NEWS updated for notmuch restore --match Date: Sat, 29 Oct 2011 19:55:15 -0000 From: David Bremner X-Patchwork-Id: 1438 Message-Id: <1319921715-23010-1-git-send-email-david@tethera.net> To: notmuch@notmuchmail.org Cc: David Bremner From: David Bremner I also reformatted the notmuch restore --accumulate docs to make it work better with multiple options. --- Better late docs than no docs... also pushed to branch nmbug on git://pivot.cs.unb.ca/notmuch.git NEWS | 12 ++++++++---- notmuch.1 | 19 +++++++++++++++++-- notmuch.c | 14 +++++++++++--- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index e00452a..9034d5c 100644 --- a/NEWS +++ b/NEWS @@ -4,11 +4,15 @@ Notmuch 0.10 (2011-xx-xx) New command-line features ------------------------- -Add "notmuch restore --accumulate" option +Add "--accumulate" and "--match" options to "notmuch restore". - The --accumulate switch causes the union of the existing and new tags to be - applied, instead of replacing each message's tags as they are read in from - the dump file. + The "--accumulate" switch causes the union of the existing and new + tags to be applied, instead of replacing each message's tags as they + are read in from the dump file. + + The "--match=" option restricts the restore operation to tags + matching the regular expression regex. One potential application is + the implementation of namespaces for tags. Add search terms to "notmuch dump" diff --git a/notmuch.1 b/notmuch.1 index bba479e..57b2062 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -480,7 +480,7 @@ section below for details of the supported syntax for . .RE .TP -.BR restore " [--accumulate] []" +.BR restore " [--accumulate] [--match=] []" Restores the tags from the given file (see .BR "notmuch dump" ")." @@ -494,10 +494,25 @@ So if you've previously been using sup for mail, then the command provides you a way to import all of your tags (or labels as sup calls them). -The --accumulate switch causes the union of the existing and new tags to be +Supported options for +.B restore +include +.RS +.TP 4 +.BR \-\-accumulate +The union of the existing and new tags is applied, instead of replacing each message's tags as they are read in from the dump file. .RE +.RS +.TP 4 +.BR \-\-match= +add or delete only tags matching +.B . +Other tags in the input (or the database) are ignored. +.RE + +.RE The .B part diff --git a/notmuch.c b/notmuch.c index e004c6c..3a51fee 100644 --- a/notmuch.c +++ b/notmuch.c @@ -401,9 +401,17 @@ static command_t commands[] = { "\tSo if you've previously been using sup for mail, then the\n" "\t\"notmuch restore\" command provides you a way to import\n" "\tall of your tags (or labels as sup calls them).\n" - "\tThe --accumulate switch causes the union of the existing and new\n" - "\ttags to be applied, instead of replacing each message's tags as\n" - "\tthey are read in from the dump file."}, + "\tSupported options for restore include\n" + "\n" + "\t --accumulate\n" + "\t The union of the existing and new tags is applied, instead of\n" + "\t replacing each message's tags as they are read in from the\n" + "\t dump file.\n" + "\n" + "\t --match=\n" + "\t Add or delete only tags matching . Other tags in the\n" + "\t input (or the database) are ignored.\n" + }, { "config", notmuch_config_command, "[get|set]
. [value ...]", "Get or set settings in the notmuch configuration file.",