From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BBC60429E25 for ; Sat, 29 Oct 2011 13:55:36 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wEqwfUhoKrEU for ; Sat, 29 Oct 2011 13:55:36 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 10CFB431FB6 for ; Sat, 29 Oct 2011 13:55:35 -0700 (PDT) Received: from zancas.localnet (fctnnbsc36w-156034064058.pppoe-dynamic.High-Speed.nb.bellaliant.net [156.34.64.58]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p9TKtOTT012113 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Sat, 29 Oct 2011 17:55:25 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1RKFw4-0005zn-5U; Sat, 29 Oct 2011 17:55:24 -0300 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] docs: man, online help, and NEWS updated for notmuch restore --match Date: Sat, 29 Oct 2011 17:55:15 -0300 Message-Id: <1319921715-23010-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: <1319857491-12298-5-git-send-email-david@tethera.net> References: <1319857491-12298-5-git-send-email-david@tethera.net> Cc: David Bremner X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 20:55:36 -0000 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.", -- 1.7.6.3