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 3DF60429E26 for ; Thu, 6 Oct 2011 17:11:03 -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 96ft+ccnCE02 for ; Thu, 6 Oct 2011 17:11:02 -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 13C24431FB6 for ; Thu, 6 Oct 2011 17:11:01 -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 p970ApJr021798 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 6 Oct 2011 21:10:52 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1RBy1a-0008Ur-Ul; Thu, 06 Oct 2011 21:10:50 -0300 From: David Bremner To: Jesse Rosenthal , Jameson Graef Rollins , Notmuch Mail Subject: Re: tag sharing In-Reply-To: References: <1306619520-25730-1-git-send-email-jrollins@finestructure.net> <87hb8eebdi.fsf@servo.factory.finestructure.net> <87pqmyn224.fsf@servo.factory.finestructure.net> <87zklyjshd.fsf@yoom.home.cworth.org> <87sjrng5k3.fsf@servo.factory.finestructure.net> <87oc2bjgrs.fsf@yoom.home.cworth.org> <8762oigc0y.fsf@servo.factory.finestructure.net> <87boya98sf.fsf@gogo.home> <87vcwg2p2m.fsf@servo.factory.finestructure.net> <87wrcijn1w.fsf@zancas.localnet> <87ipo2td84.fsf@zancas.localnet> <87zkhduax2.fsf@convex-new.cs.unb.ca> User-Agent: Notmuch/0.9_rc1-42-g76fdca8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 06 Oct 2011 21:10:50 -0300 Message-ID: <8762k1u0dx.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Fri, 07 Oct 2011 00:11:03 -0000 On Thu, 06 Oct 2011 16:40:00 -0400, Jesse Rosenthal wrote: > On Thu, 06 Oct 2011 17:23:21 -0300, David Bremner wrote: > > What doesn't work is searches for the whole namespace "notmuch search > > tag:bremner.*" will return nothing, even though "notmuch search > > tag:bremner.to-fix" does. > > A simple shell way to do this would be > > notmuch search-tags | grep "^bremner\." | xargs -I {} notmuch search tag:{} > Ah thanks, that is not so bad. It turns out to be literally a one line change to add a query argument for notmuch-dump, _except_ that notmuch dump already uses the first command line argument as an output file name. I think I will start a seperate thread about that. If you want to test, this works OK, except the output is put in a file named after the query ;). diff --git a/notmuch-dump.c b/notmuch-dump.c index 7e7bc17..341207a 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -40,7 +40,7 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (notmuch == NULL) return 1; - query = notmuch_query_create (notmuch, ""); + query = notmuch_query_create (notmuch, argc > 0 ? argv[0] : ""); if (query == NULL) { fprintf (stderr, "Out of memory\n"); return 1;