Re: [PATCH 1/4] emacs: new customization variable to exclude "deleted" messages from...
authorAustin Clements <amdragon@MIT.EDU>
Mon, 9 Jan 2012 04:31:01 +0000 (23:31 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:48 +0000 (09:41 -0800)
69/4c2b4e0ba1a54e3afdebca9df9b037a9a96664 [new file with mode: 0644]

diff --git a/69/4c2b4e0ba1a54e3afdebca9df9b037a9a96664 b/69/4c2b4e0ba1a54e3afdebca9df9b037a9a96664
new file mode 100644 (file)
index 0000000..bb9d56f
--- /dev/null
@@ -0,0 +1,113 @@
+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 13C5B429E21\r
+       for <notmuch@notmuchmail.org>; Sun,  8 Jan 2012 20:30:51 -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 pQbwquCJDtAS for <notmuch@notmuchmail.org>;\r
+       Sun,  8 Jan 2012 20:30:50 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 64329431FB6\r
+       for <notmuch@notmuchmail.org>; Sun,  8 Jan 2012 20:30:50 -0800 (PST)\r
+X-AuditID: 12074424-b7fae6d000000906-85-4f0a6d7992d5\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 03.14.02310.97D6A0F4; Sun,  8 Jan 2012 23:30:49 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q094UndH016190; \r
+       Sun, 8 Jan 2012 23:30:49 -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.6/8.12.4) with ESMTP id q094UlBf021676\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sun, 8 Jan 2012 23:30:48 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@MIT.EDU>)\r
+       id 1Rk6sv-000655-NW; Sun, 08 Jan 2012 23:31:01 -0500\r
+Date: Sun, 8 Jan 2012 23:31:01 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Aaron Ecay <aaronecay@gmail.com>\r
+Subject: Re: [PATCH 1/4] emacs: new customization variable to exclude\r
+       "deleted" messages from search\r
+Message-ID: <20120109043101.GH20796@mit.edu>\r
+References: <1325975294-646-1-git-send-email-jrollins@finestructure.net>\r
+       <1325975294-646-2-git-send-email-jrollins@finestructure.net>\r
+       <m2wr91ismu.fsf@gmail.com> <20120109014938.GE20796@mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <20120109014938.GE20796@mit.edu>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrMKsWRmVeSWpSXmKPExsUixG6noluZy+VvsOSWkcW05V/YLfbs87K4\r
+       fnMmswOzx93TXB47Z91l93i26hZzAHMUl01Kak5mWWqRvl0CV8b6Pf3sBT+5Kv49v8rUwHif\r
+       o4uRk0NCwESi4fMaRghbTOLCvfVsXYxcHEIC+xglXi6fzgaSEBJYzyjx4DY3hH2CSWLHCkaI\r
+       oiWMEjMO/mEHSbAIqEjc+L2DCcRmE9CQ2LZ/OdhUEYFEiV8v/jCD2MwCWhJbN34AiwsLpElc\r
+       m7oYrJdXQEdi3Y7pTBBDjzNK3D5wnhUiIShxcuYTFohmdYk/8y4BDeIAsqUllv/jgAjLSzRv\r
+       nQ02n1NAV2Lj9yaw+aJA90w5uY1tAqPwLCSTZiGZNAth0iwkkxYwsqxilE3JrdLNTczMKU5N\r
+       1i1OTszLSy3SNdfLzSzRS00p3cQIjgsXlR2MzYeUDjEKcDAq8fAK2HD5C7EmlhVX5h5ilORg\r
+       UhLllcwGCvEl5adUZiQWZ8QXleakFh9ilOBgVhLhFTADyvGmJFZWpRblw6SkOViUxHk1tN75\r
+       CQmkJ5akZqemFqQWwWRlODiUJHj35wA1ChalpqdWpGXmlCCkmTg4QYbzAA0/BFLDW1yQmFuc\r
+       mQ6RP8WoKCXOOwEkIQCSyCjNg+uFpa1XjOJArwjzbgep4gGmPLjuV0CDmYAGP/jDDjK4JBEh\r
+       JdXAOLlX6SB/Z4DjJP+YI/fjgnlrKy3/NO1IatpUbre1dAfD4ti/OSbvXq/J6/yZJx5SEGke\r
+       otNkpi7AJ/Xup8DSyg+3pr3ckKA56cKpivlLHl55nDr1lvOHdz2WO26vPX3/LFNWgRFHsl5S\r
+       dtdXX7fP1duPzO2L3FN6nmlFsMOnQ97vE98+z929TYmlOCPRUIu5qDgRAK0TccI2AwAA\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\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, 09 Jan 2012 04:30:51 -0000\r
+\r
+Quoth myself on Jan 08 at  8:49 pm:\r
+> > > @@ -927,6 +932,9 @@ The optional parameters are used as follows:\r
+> > >      (set 'notmuch-search-target-thread target-thread)\r
+> > >      (set 'notmuch-search-target-line target-line)\r
+> > >      (set 'notmuch-search-continuation continuation)\r
+> > > +    (when (and notmuch-search-exclude-deleted\r
+> > > +               (not (string-match "tag:deleted[ )]*" query)))\r
+> > \r
+> > “is:” is a synonym for “tag:” in searches – so this section of the code\r
+> > should look for it too.\r
+> \r
+> There are several other things that could also trip up this regexp.\r
+> xtag:deletedx would be falsely matched, as would a quoted phrase\r
+> containing "tag:deleted", while tag:"deleted" and tag:(deleted) would\r
+> incorrectly not be matched.  Getting this right is hard, though I'd be\r
+> happy with\r
+> \r
+>   "\\<\\(tag\\|is\\):deleted\\>"\r
+> \r
+> or maybe\r
+> \r
+>   "\\<\\(tag\\|is\\):\\(\"?\\)deleted\\>\\2"\r
+\r
+For the record, here's a More Correct (TM) version\r
+\r
+  "\\(^\\|[-+ ()]\\)\\(tag\\|is\\):\\(\"?\\)deleted\\3\\($\\|[ ()]\\)"\r
+\r
+However, as we discussed on IRC, it's probably better to fix this in\r
+the CLI/library by adding a config option for auto-excluded tags, an\r
+API to register these with the library (probably part of the query\r
+API), and to iterate over the terms in the parsed query to determine\r
+which tag exclusions should be automatically added.\r