Re: [PATCH] notmuch new --new-tags=tags...
authorJameson Rollins <jrollins@finestructure.net>
Mon, 12 Apr 2010 11:59:14 +0000 (07:59 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:35 +0000 (09:36 -0800)
49/79ea06b11576d9d48d3df17cbec54f7178ce74 [new file with mode: 0644]

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