Re: [PATCH] notmuch: Add "maildir:" search option
authorAustin Clements <aclements@csail.mit.edu>
Tue, 12 Nov 2013 19:39:52 +0000 (14:39 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:12 +0000 (09:58 -0800)
4e/6813a5e39039ec1307aa6ade1a751a5aadf862 [new file with mode: 0644]

diff --git a/4e/6813a5e39039ec1307aa6ade1a751a5aadf862 b/4e/6813a5e39039ec1307aa6ade1a751a5aadf862
new file mode 100644 (file)
index 0000000..eb8de71
--- /dev/null
@@ -0,0 +1,98 @@
+Return-Path: <amdragon@mit.edu>\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 A4D14431FD7\r
+       for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 11:40:03 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 xOuby75+TVPE for <notmuch@notmuchmail.org>;\r
+       Tue, 12 Nov 2013 11:39:56 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu\r
+       [18.9.25.12])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 077B6431FD2\r
+       for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 11:39:55 -0800 (PST)\r
+X-AuditID: 1209190c-b7f7f6d000000bbd-31-5282840ba95a\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id A9.08.03005.B0482825; Tue, 12 Nov 2013 14:39:55 -0500 (EST)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id rACJdrBe001174; \r
+       Tue, 12 Nov 2013 14:39:54 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id rACJdqxH004710\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Tue, 12 Nov 2013 14:39:53 -0500\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VgJoW-000672-5s; Tue, 12 Nov 2013 14:39:52 -0500\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+To: Peter Zijlstra <peterz@infradead.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] notmuch: Add "maildir:" search option\r
+In-Reply-To: <87mwl94dte.fsf@awakening.csail.mit.edu>\r
+References: <20131112155637.GA16796@laptop.programming.kicks-ass.net>\r
+       <87mwl94dte.fsf@awakening.csail.mit.edu>\r
+User-Agent: Notmuch/0.16+154~g96c0ce2 (http://notmuchmail.org) Emacs/23.4.1\r
+       (i486-pc-linux-gnu)\r
+Date: Tue, 12 Nov 2013 14:39:52 -0500\r
+Message-ID: <87k3gd4dfb.fsf@awakening.csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFrrLIsWRmVeSWpSXmKPExsUixG6nosvd0hRksOIfv8X1mzOZLY73HmBy\r
+       YPLYvELL49mqW8wBTFFcNimpOZllqUX6dglcGUtXnWQr2MBRcfvID8YGxg9sXYycHBICJhKd\r
+       Bw8zQthiEhfurQeKc3EICcxmkljSNp8ZwtnIKNH7/g6Uc5pJYt/KBrAWIYEljBJXnkiC2GwC\r
+       +hIr1k5iBbFFBJwk7n6aCmRzcAgLWEns35UEYnIKmEqsmFUA0ZkncbD/OROILSoQLzFt4U5m\r
+       EJtFQFXi6cQmRpByXpDj1oKV8AoISpyc+YQFxGYW0JK48e8l0wRGgVlIUrOQpBYwMq1ilE3J\r
+       rdLNTczMKU5N1i1OTszLSy3SNdTLzSzRS00p3cQICkVOSZ4djG8OKh1iFOBgVOLhfRDZFCTE\r
+       mlhWXJl7iFGSg0lJlNe4DijEl5SfUpmRWJwRX1Sak1p8iFGCg1lJhNehFijHm5JYWZValA+T\r
+       kuZgURLnvclhHyQkkJ5YkpqdmlqQWgSTleHgUJLgZaoHahQsSk1PrUjLzClBSDNxcIIM5wEa\r
+       XtoIMry4IDG3ODMdIn+KUVFKnFetCSghAJLIKM2D64WlileM4kCvCPPmgqzgAaYZuO5XQIOZ\r
+       gAZbFIMNLklESEk1MJbPU/dn32N7q9pyHdPelw5aCbrGk0LXX/wgtvuBd9y3aR2Pc7+s2PV8\r
+       kr3npMA53RopvYnF9z6875F1/MP60tXWOt5F59lL9SaGKJfKz0EnYz6oHbBQydkZLbOv4ZDJ\r
+       9Pm68wK+Btc0LNTZe8HvSMa9XivX2oK9djJNvEt+bJg66TITO/eWz0osxRmJhlrMRcWJAJ3U\r
+       kWHwAgAA\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: Tue, 12 Nov 2013 19:40:03 -0000\r
+\r
+On Tue, 12 Nov 2013, Austin Clements <aclements@csail.mit.edu> wrote:\r
+> I think this is a great idea.  Personally I think this is how folder:\r
+> should work.  I find the semantics of folder: to be useless except where\r
+> they happen to coincide with the boolean semantics used here.\r
+> Unfortunately, changing folder: would require versioning the database,\r
+> which we have only primordial support for right now.\r
+>\r
+> Various comments below, though nothing major.  Of course, we'd also need\r
+> some tests and man page updates for this.\r
+\r
+Sorry, one important thing I missed: this doesn't correctly handle when\r
+file names are removed from a message\r
+(_notmuch_message_remove_filename).  Probably the simplest thing would\r
+be to follow the template for how folder: works by first removing *all*\r
+folder terms and then adding back the still-valid ones.  (Unfortunately,\r
+just removing the term for the removed filename's directory won't work\r
+because the message could have other filenames in the same directory,\r
+though maybe you could just scan for that possibility?)\r