--- /dev/null
+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 38B05431FD0\r
+ for <notmuch@notmuchmail.org>; Sun, 8 Jan 2012 17:49:28 -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 IgZnkpP4tL9a for <notmuch@notmuchmail.org>;\r
+ Sun, 8 Jan 2012 17:49:27 -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 BADFB431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 8 Jan 2012 17:49:27 -0800 (PST)\r
+X-AuditID: 12074424-b7fae6d000000906-94-4f0a47a6ecf4\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id A4.3F.02310.6A74A0F4; Sun, 8 Jan 2012 20:49:26 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q091nP4q004806; \r
+ Sun, 8 Jan 2012 20:49:26 -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 q091nOml006362\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sun, 8 Jan 2012 20:49:25 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1Rk4Mk-0005xP-SA; Sun, 08 Jan 2012 20:49:38 -0500\r
+Date: Sun, 8 Jan 2012 20:49:38 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: 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: <20120109014938.GE20796@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>\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: <m2wr91ismu.fsf@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrKKsWRmVeSWpSXmKPExsUixG6nrrvMncvf4GGzmsW05V/YLfbs87K4\r
+ fnMmswOzx93TXB47Z91l93i26hZzAHMUl01Kak5mWWqRvl0CV8afkzOZCh5wVHyYv4mtgbGN\r
+ vYuRk0NCwETi/NynULaYxIV769m6GLk4hAT2MUrcWz6HEcJZzyhxpHMnK4Rzgkni75VXUGVL\r
+ GCU6uv+xgfSzCKhIHH/XxgRiswloSGzbv5wRxBYBis+eNx/MZhZIl7i8fQdYvbBAmsS1qYvB\r
+ dvMK6Ej8fXWQBW5o29wGRoiEoMTJmU9YIJrVJf7Mu8TcxcgBZEtLLP/HARGWl2jeOpsZxOYE\r
+ KrnQugrsBlGgvVNObmObwCg8C8mkWUgmzUKYNAvJpAWMLKsYZVNyq3RzEzNzilOTdYuTE/Py\r
+ Uot0zfVyM0v0UlNKNzGCY8NFZQdj8yGlQ4wCHIxKPLwCNlz+QqyJZcWVuYcYJTmYlER5T7sC\r
+ hfiS8lMqMxKLM+KLSnNSiw8xSnAwK4nwCpgB5XhTEiurUovyYVLSHCxK4rwaWu/8hATSE0tS\r
+ s1NTC1KLYLIyHBxKErxH3IAaBYtS01Mr0jJzShDSTBycIMN5gIafB6nhLS5IzC3OTIfIn2JU\r
+ lBLnFQImHyEBkERGaR5cLyx1vWIUB3pFmPcMSDsPMO3Bdb8CGswENPjBH3aQwSWJCCmpBkae\r
+ 2CM+em/mpFzUf93g/+mlcebWK5O6E07On513msFovYvhPO/wQqmS+PBrUzeFsR4xWpZVuF50\r
+ zpm1oW+TLjKfz1xz5e92BeFXltdiH8ld2il3wn3ev7O7uTIulDKV8yVVyazd2LrVXK9Jbom0\r
+ +a5+/z25N8v3/ZRZK70pJEhQceEV0R1BSSFKLMUZiYZazEXFiQCJg6x2OAMAAA==\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 01:49:28 -0000\r
+\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
+Implicit exclusions like this were actually one of my target features\r
+for the custom query parser, but I think hacking around that by\r
+inspecting the query string is a fine interim solution. (One of these\r
+months I'll dust off the query parser, really!)\r