[PATCH] docs: man, online help, and NEWS updated for notmuch restore --match

David Bremner david at tethera.net
Sat Oct 29 13:55:15 PDT 2011


From: David Bremner <bremner at debian.org>

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=<regex>" 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 <search-terms>.
 .RE
 
 .TP
-.BR restore " [--accumulate] [<filename>]"
+.BR restore " [--accumulate] [--match=<regex>] [<filename>]"
 
 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=<regex>
+add or delete only tags matching 
+.B <regex>.
+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=<regex>\n"
+      "\t      Add or delete only tags matching <regex>.  Other tags in the\n"
+      "\t      input (or the database) are ignored.\n"
+    },
     { "config", notmuch_config_command,
       "[get|set] <section>.<item> [value ...]",
       "Get or set settings in the notmuch configuration file.",
-- 
1.7.6.3



More information about the notmuch mailing list