Re: [PATCH v2 3/3] search: Support automatic tag exclusions
authorAustin Clements <amdragon@MIT.EDU>
Tue, 17 Jan 2012 20:32:11 +0000 (15:32 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:30 +0000 (09:42 -0800)
bc/06d28f57cb27fd48022636a56cc70f8b9c3c0d [new file with mode: 0644]

diff --git a/bc/06d28f57cb27fd48022636a56cc70f8b9c3c0d b/bc/06d28f57cb27fd48022636a56cc70f8b9c3c0d
new file mode 100644 (file)
index 0000000..9317e4b
--- /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 65F79421197\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 12:32:26 -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 Wvl7vAKTDnQZ for <notmuch@notmuchmail.org>;\r
+       Tue, 17 Jan 2012 12:32:25 -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 A2CA0421192\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 12:32:25 -0800 (PST)\r
+X-AuditID: 12074424-b7fae6d000000906-63-4f15dad9095b\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id E2.B7.02310.9DAD51F4; Tue, 17 Jan 2012 15:32:25 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0HKWOi2010782; \r
+       Tue, 17 Jan 2012 15:32:24 -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 q0HKWMQM017195\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 17 Jan 2012 15:32:23 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RnFhT-00085o-Al; Tue, 17 Jan 2012 15:32:11 -0500\r
+Date: Tue, 17 Jan 2012 15:32:11 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: David Edmondson <dme@dme.org>\r
+Subject: Re: [PATCH v2 3/3] search: Support automatic tag exclusions\r
+Message-ID: <20120117203211.GQ16740@mit.edu>\r
+References: <1326258173-21163-1-git-send-email-amdragon@mit.edu>\r
+       <1326496024-14403-1-git-send-email-amdragon@mit.edu>\r
+       <1326496024-14403-4-git-send-email-amdragon@mit.edu>\r
+       <87wr8tsvit.fsf@servo.finestructure.net>\r
+       <cunfwfg57uh.fsf@hotblack-desiato.hh.sledj.net>\r
+       <20120116192836.GC16740@mit.edu>\r
+       <CA+eQo_3xxuhgUUXWXWyVD1LFhvhkw2psbA3ZnFnZk=BjjHXy8w@mail.gmail.com>\r
+       <cunpqeir912.fsf@hotblack-desiato.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <cunpqeir912.fsf@hotblack-desiato.hh.sledj.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IR4hTV1r15S9TfYMtpNot9d7YwWbR+vsRs\r
+       cf3mTGYHZo9dz/8yeUx92cfi8WzVLeYA5igum5TUnMyy1CJ9uwSujN8Hb7AUrOWsmPxzO1MD\r
+       YzN7FyMnh4SAicTH6duYIGwxiQv31rN1MXJxCAnsY5RYP/8nE4SzgVHia+cbdgjnJJPEm6az\r
+       LBDOEkaJTYceM4P0swioSlx+vBTMZhPQkNi2fzkjiC0ioCjx/9sKsH3MAo4Sr19cBxrLwSEs\r
+       4CKxoVMPJMwroCPx5dtCqG3LmSUmNd9mgkgISpyc+YQFoldL4sa/l2C9zALSEsv/cYCEOQVs\r
+       JB7u6gBbKyqgIjHl5Da2CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJd\r
+       c73czBK91JTSTYygYGd3UdnB2HxI6RCjAAejEg+vxAZRfyHWxLLiytxDjJIcTEqivLNuAIX4\r
+       kvJTKjMSizPii0pzUosPMUpwMCuJ8F66DJTjTUmsrEotyodJSXOwKInzami98xMSSE8sSc1O\r
+       TS1ILYLJynBwKEnwHroJ1ChYlJqeWpGWmVOCkGbi4AQZzgM0fBdIDW9xQWJucWY6RP4Uo6KU\r
+       OO98kIQASCKjNA+uF5aMXjGKA70izPsNpIoHmMjgul8BDWYCGpzTKgQyuCQRISXVwMi++c32\r
+       Ve53NwRUivLUfFSctX17elSGn/WGew9VFnT8+HpNdX1tkE3/971JlVwnDuZI337VesHjoJIy\r
+       w9GkM40/Prs9nn0l5NFNz/7/voWTJnt3JtxfrqrS7+C1Xipuou6m6RaHL/zLU9517vM9+WUJ\r
+       k/8/XPLm46N13yZFTbNdXdF34ZGpVdMuJZbijERDLeai4kQAsaVwSiEDAAA=\r
+Cc: notmuch@notmuchmail.org, Jeremy Nickurak <jeremy@nickurak.ca>\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, 17 Jan 2012 20:32:26 -0000\r
+\r
+Quoth David Edmondson on Jan 17 at  9:08 am:\r
+> On Mon, 16 Jan 2012 15:16:24 -0700, Jeremy Nickurak <jeremy@nickurak.ca> wrote:\r
+> > On Mon, Jan 16, 2012 at 12:28, Austin Clements <amdragon@mit.edu> wrote:\r
+> > >> Having "deleted" and "spam" as default settings in the configuration\r
+> > >> file might be more reasonable.\r
+> > \r
+> > If I read correctly:\r
+> > \r
+> > 1) If no exclude options are in the config file, none should be used.\r
+> \r
+> Yes.\r
+> \r
+> > 2) On notmuch setup, "deleted" and "spam" should be added to .notmuch-config\r
+> \r
+> I might argue between 'should' and 'could', but the sense is correct.\r
+\r
+Oh, I think I see.  I don't know if I can do precisely that, since the\r
+config code doesn't know if it's being called from setup, but is\r
+something like this essentially what you're suggesting?\r
+\r
+    if (notmuch_config_get_auto_exclude_tags (config, &tmp) == NULL) {\r
+        if (is_new) {\r
+            const char *tags[] = { "deleted", "spam" };\r
+            notmuch_config_set_auto_exclude_tags (config, tags, 2);\r
+        } else {\r
+            notmuch_config_set_auto_exclude_tags (config, NULL, 0);\r
+        }\r
+    }\r
+\r
+(where is_new is TRUE if this is a brand-new config file)\r