Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 63 / aac8222566b9b26625ee7efd9dc1d34651c585
1 Return-Path: <rjhorn@alum.mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id BFED4431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 18 May 2012 07:48:11 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 5BxoDMQuQSyg for <notmuch@notmuchmail.org>;\r
16         Fri, 18 May 2012 07:48:10 -0700 (PDT)\r
17 Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89])\r
18         by olra.theworths.org (Postfix) with ESMTP id 7136D431FAE\r
19         for <notmuch@notmuchmail.org>; Fri, 18 May 2012 07:48:10 -0700 (PDT)\r
20 Received: from quad.robs.office (panix2.panix.com [166.84.1.2])\r
21         by mailbackend.panix.com (Postfix) with ESMTP id ED0702EDAB;\r
22         Fri, 18 May 2012 10:48:08 -0400 (EDT)\r
23 From: Robert Horn <rjhorn@alum.mit.edu>\r
24 To: Tomi Ollila <tomi.ollila@iki.fi>, Austin Clements <amdragon@MIT.EDU>\r
25 Subject: Re: Using procmail to set tags\r
26 In-Reply-To: <m21umllfuk.fsf@guru.guru-group.fi>\r
27 References: <m3vcjyl4kg.fsf@quad.robs.office> <20120515132238.GO11804@mit.edu>\r
28         <m21umllfuk.fsf@guru.guru-group.fi>\r
29 User-Agent: Notmuch/0.13 (http://notmuchmail.org) Emacs/23.3.1\r
30         (x86_64-suse-linux-gnu)\r
31 Date: Fri, 18 May 2012 10:48:08 -0400\r
32 Message-ID: <m362btv93r.fsf@quad.robs.office>\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=us-ascii\r
35 Cc: notmuch@notmuchmail.org\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Fri, 18 May 2012 14:48:11 -0000\r
49 \r
50 Tomi Ollila <tomi.ollila@iki.fi> writes:\r
51 \r
52 > On Tue, May 15 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
53 >   * execute notmuch new\r
54 >   * use the environment variables in post-new hook \r
55 >       (notmuch tags $NEW_TAGS -new tag:new)\r
56 >\r
57 Thanks to all, that gave me enough hints to make progress.\r
58 \r
59 It looks like adding a new tag in the config, "needsProcessing", and\r
60 then a post-new hook to a script that I write should do the job.\r
61 Instead of dealing an even more complex and arcane procmail setup, I\r
62 write a script that runs as the post-new hook.  I'm finding the "new"\r
63 flagging works correctly for simple mail drop from postfix, so the extra\r
64 flag will work.  I don't want to work off "new" because that's also\r
65 useful for mail reading and other uses.  The post-new hook can start by\r
66 finding the emails that are tagged "needsProcessing", parse and tag them\r
67 appropriately, and remove the needsProcessing tag.  It just needs to\r
68 start with a query and be written to work on all the messages found, so it\r
69 doesn't matter how many are new.\r
70 \r
71 At the moment it looks like a simple python script using the notmuch\r
72 library binding may be easiest. If not, there are other tools to do the\r
73 job.\r
74 \r
75 R Horn\r
76 rjhorn@alum.mit.edu\r