Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3258F431FD0 for ; Wed, 28 Dec 2011 17:26:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 77AWGBZXcLeT for ; Wed, 28 Dec 2011 17:26:03 -0800 (PST) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 97551431FB6 for ; Wed, 28 Dec 2011 17:26:03 -0800 (PST) X-AuditID: 1209190c-b7fad6d000000920-8f-4efbc1aac0b4 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id FB.98.02336.AA1CBFE4; Wed, 28 Dec 2011 20:26:03 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBT1Q2nn007571; Wed, 28 Dec 2011 20:26:02 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBT1Q0Qw018494 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 28 Dec 2011 20:26:01 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1Rg4lb-0003Ay-EE; Wed, 28 Dec 2011 20:26:47 -0500 Date: Wed, 28 Dec 2011 20:26:47 -0500 From: Austin Clements To: Xavier Maillard Subject: Re: Tagging strategy and latest notmuch Message-ID: <20111229012647.GG30150@mit.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPIsWRmVeSWpSXmKPExsUixG6nrrv64G8/g4eNrBbXb85ktnjUvp/d gcmjbZqZx7NVt5gDmKK4bFJSczLLUov07RK4MqYdqy44LVzRO385cwPjYf4uRk4OCQETiX/L O9kgbDGJC/fWA9lcHEIC+xglNi2ZxwzhbGCU+P/2M1iVkMBJJokt5+IgEksYJZ5PnckEkmAR UJVYd/kJWBGbgIbEtv3LGUFsEQFFiQOb9oHFmQWkJb79bgaq5+AQFjCQmHiBAyTMK6Ajsf7L d1aQsBDQRb83ZUOEBSVOznzCAtGpJXHj30uwTpApy/+BdXIKmEqcvbMJ7ABRARWJKSe3sU1g FJqFpHsWku5ZCN0LGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrq5WaW6KWmlG5iBIUzpyTP DsY3B5UOMQpwMCrx8Hoa/vYTYk0sK67MPcQoycGkJMobsAcoxJeUn1KZkVicEV9UmpNafIhR goNZSYS3djdQjjclsbIqtSgfJiXNwaIkzqui9c5PSCA9sSQ1OzW1ILUIJivDwaEkwesDjFsh waLU9NSKtMycEoQ0EwcnyHAeoOHvD4AMLy5IzC3OTIfIn2JUlBLntQJpFgBJZJTmwfXC0s0r RnGgV4R5tUCqeICpCq77FdBgJqDB5879AhlckoiQkmpgbJTWjZq3wHHtk+wdc2avMjvEwqsz W9DSNG7P4iSN4jU+257wVeW2bfnwQu2cjtFKv12npWtbN7TJ2vwQ5ivfLPCkyXi3zxupubyc anuKs9YsnBXy2YT9cE+GY2XNMZnpyx7eXHWpqeGqQqgJs/LyhV4rZh8NmDC5TfHXJ72Que9/ bpKbn3EwTomlOCPRUIu5qDgRADKe2KsSAwAA Cc: notmuch@notmuchmail.org 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: Thu, 29 Dec 2011 01:26:04 -0000 Quoth Xavier Maillard on Dec 28 at 11:46 pm: > Hi, > > my mail workflow is pretty /basic/ and /raw/. Here it is: > > 1a. notmuch new (for consistency sake) > 1b. notmuchsync syncs from notmuch tags to my maildir flags (actually, it is to > prune is:delete tagged messages) The synchronization of notmuch tags and maildir flags has been part of notmuch for several releases now, so you don't need an external tool to do that (unless you have some unusual configuration for it). You can delete is:delete messages reasonably easily from a script (perhaps a tagging script or a cron job) using something like notmuch search --output=files is:delete | xargs rm (untested, so don't take my word for it.) > 2. offlineimap syncs with my imap server > 3. notmuch new incorporate new messages into the database > 4. notmuchsync syncs from my maildirs flags to notmuch > 5. (at last) a shell-script is testing/tagging all my messages corpus As of 0.11 (not 0.10.x, though), the right place to do initial tagging is in the .notmuch/hooks/post-new script (there's obviously no harm in doing it in a separate script, but if you do it in post-new, notmuch will run the script for you). > > This is a solution I am using for months but I am pretty sure it is not > adapted with latest notmuch. Sadly I could not follow the recent feature > additions (and reading through NEWS file or the wiki is not really > helping). > > So what I am looking for is a "modern" solution to replace my current > strategy not really /scalable/ -i.e incorporating new mails is really > getting slower each day- and most importantly I really need to reduce > time taken to tag new material. Currently, my tagging script processes > all my notmuch database even if only new mails are really tagged, it has > to test each message to sort out what messages need tags; tagging only > new mail would be really awesome. Nothing has changed on this front to my knowledge, but a common technique is to have notmuch tag all new mail with a "new" tag (using the "tags" setting under the [new] configuration section), to use tag:new in tagging operations that should only apply to newly incorporated mail, and then to remove tag:new from everything at the end of your tagging script. One thing that may help a bit is that, as of 0.10, notmuch tag has been optimized so, for example "notmuch tag -new '*'" is efficient. > By the way, I am using 0.10.x. > > Thank you > > /Xavier