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 0BDFC4196F2 for ; Mon, 12 Apr 2010 04:59:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.19 X-Spam-Level: X-Spam-Status: No, score=-4.19 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=ham 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 g-2WyWPXtGdA for ; Mon, 12 Apr 2010 04:59:37 -0700 (PDT) Received: from brinza.cc.columbia.edu (brinza.cc.columbia.edu [128.59.29.8]) by olra.theworths.org (Postfix) with ESMTP id 1B0A3431FC1 for ; Mon, 12 Apr 2010 04:59:37 -0700 (PDT) Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com [72.227.128.66]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by brinza.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o3CBxSVg024813 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 12 Apr 2010 07:59:29 -0400 (EDT) Received: from jrollins by servo.finestructure.net with local (Exim 4.71) (envelope-from ) id 1O1IIa-0001fn-3h; Mon, 12 Apr 2010 07:59:28 -0400 From: Jameson Rollins To: Sebastian Spaeth , Anthony Towns , notmuch Subject: Re: [PATCH] notmuch new --new-tags=tags... In-Reply-To: <871velp0be.fsf@SSpaeth.de> References: <871velp0be.fsf@SSpaeth.de> Date: Mon, 12 Apr 2010 07:59:14 -0400 Message-ID: <87y6gseval.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.8 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: Mon, 12 Apr 2010 11:59:38 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 12 Apr 2010 10:00:37 +0200, "Sebastian Spaeth" wrote: > On 2010-04-10, Anthony Towns wrote: > > The attached patch makes "notmuch new --new-tags=3Dunread,new" set the > > "unread" and "new" tags on any new mail it finds rather than "unread" > > and "inbox". Or whatever other tags you happen to specify. >=20 > Thanks for the patch. I can't comment on the code quality, but rather > than having to specify the set of new tags on the command line every > time, I think it would make more sense to put them in the notmuch config > file as this patch does: > id:1268432006-24333-2-git-send-email-bgamari.foss@gmail.com I was thinking about this, and it seems to me that we really need is a way to just specify which tags should be applied to new messages based on search terms. It's becoming pretty clear that most people are doing some sort of post-notmuch-new tag processing to modify the tags of new messages to suite their needs. Why not just integrate this directly into the notmuch-new processing itself? It seems like if this was integrated into notmuch-new directly, the entire processing of new messages could be sped up considerably, so that one wouldn't have to call multiple notmuch-new processes in succession. I'm not sure exactly what the best way to handle it would be, but I can imagine something like this: [new-tags] +sent -new -- from:jrollins@finestructure.net +drafts -new -- folder:draft +notmuch -- from:notmuch@notmuchmail.org +unread +inbox -new -- tag:new These are all just commands for "notmuch tag" that would be run on all the new messages as they're processed. Each new message would be given "new" tag by default, and then the new tag commands would be run. So it would be the equivalent of running the following commands: notmuch new --new-tags=3Dnew notmuch tag +sent -new -- from:jrollins@finestructure.net notmuch tag +drafts -new -- folder:draft notmuch tag +notmuch -- from:notmuch@notmuchmail.org notmuch tag +unread +inbox -- tag:new This would make things much easier for everyone who is doing post-new tag processing, which I think is probably most people. And I'm sure it could be made much more efficient (if coded properly) than running all these notmuch commands in succession, especially for people who have a lot of post-new tag processing to do. Keeping the syntax identical to the notmuch-tag command syntax would keep things simple as well. Do people who do a lot of post-notmuch-new tag processing think something like this would suite their needs? jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLwwsTAAoJEO00zqvie6q8REkP+wVt51NlL+1D2t/UNqb2awYn bfDepYfqB1GtykQ0yMPmnRVnAkWYSm0fS/JKoWXHmu+SPBPvbzbXavjPewmp76rg rtjMq5E9Q9kXgmUnJY/sVcwUwfdctWRVahQMDR6skcyIMSVQ6ppQNPc4osmd8z9B +Fjf0f41VN86qsbRgDDAD5NBxQ7oePvMaK7XZT4mb3CJYbel/RVExOef7kq1+b8v Hlk3s0yWAdnC6XKZHKtQKCFfaNOU7K0ykpxV7V5V3rxXETX633IULNFk8Ns3BQbA 9SCD+2OAJ9Z8VqHup4E7aahxbznK0ONyUV0nVG27c+7fuGsmQ+KwfnLz8VXSPbFg ICYdFyUsKu8crufn3a9OYn+cEdB9ZzEqjP1DVk15zxUm9KvjCMLipUVU/1opwyXt aT0RfaETWMljue2MyQJ5WUS2qMyRE+tG/VgI5oWiPKqs0kNTvmdAsxrJFi7QLxu1 DTp1O4R8i2d3sp7Vbz6HyGsYFKB4T4DjeVAp0iIQ9Trm3etEXD8+QciFEiLwnGTW bk1VuGi3QulB2Xpuk9fXBPpJMjguRY7tRqFInrhVK9PlmTLYv3ZOQGQEbYNhzWPL 95cUHBwx9BIBz+/otR6Gq8hDElsu/gqAsXsir8ozqLRNhDCkuEisnYSnSoXEGHlw e9waVHEGfksNRj4lP/h5 =BN6P -----END PGP SIGNATURE----- --=-=-=--