Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 37 / 77e92917fb229d769dbcf5a4b435b66f16b49c
1 Return-Path: <jani@nikula.org>\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 0BE2E429E25\r
6         for <notmuch@notmuchmail.org>; Sun,  4 Dec 2011 11:56:22 -0800 (PST)\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 rPv5Tzv9f9nG for <notmuch@notmuchmail.org>;\r
16         Sun,  4 Dec 2011 11:56:21 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  22E65429E21    for <notmuch@notmuchmail.org>; Sun,  4 Dec 2011 11:56:21 -0800\r
21  (PST)\r
22 Received: by wgbds13 with SMTP id ds13so4735298wgb.2\r
23         for <notmuch@notmuchmail.org>; Sun, 04 Dec 2011 11:56:20 -0800 (PST)\r
24 Received: by 10.216.158.15 with SMTP id p15mr1502304wek.77.1323028579902;\r
25         Sun, 04 Dec 2011 11:56:19 -0800 (PST)\r
26 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
27         [80.220.92.23]) by mx.google.com with ESMTPS id\r
28         fw16sm24001363wbb.13.2011.12.04.11.56.18\r
29         (version=SSLv3 cipher=OTHER); Sun, 04 Dec 2011 11:56:18 -0800 (PST)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: Tom Prince <tom.prince@ualberta.net>, notmuch@notmuchmail.org\r
32 Subject: Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new\r
33  hooks\r
34 In-Reply-To: <877h2cgu8h.fsf@hermes.hocat.ca>\r
35 References:\r
36  <7fbe6befcf31881a9bca672f55b93501249a220c.1322859389.git.jani@nikula.org>\r
37         <6688b09fffa2a66b496af78008102f88ab4e9450.1322953841.git.jani@nikula.org>\r
38         <6ccaa31da55b0dfc9e339780e43e24e1489235e8.1322953841.git.jani@nikula.org>\r
39         <877h2cgu8h.fsf@hermes.hocat.ca>\r
40 User-Agent: Notmuch/0.10+59~g7f77e5e (http://notmuchmail.org) Emacs/23.3.1\r
41         (i686-pc-linux-gnu)\r
42 Date: Sun, 04 Dec 2011 21:56:16 +0200\r
43 Message-ID: <87mxb8kt5r.fsf@nikula.org>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Sun, 04 Dec 2011 19:56:22 -0000\r
59 \r
60 On Sun, 04 Dec 2011 11:46:38 -0500, Tom Prince <tom.prince@ualberta.net> wrote:\r
61 > On Sun,  4 Dec 2011 01:16:49 +0200, Jani Nikula <jani@nikula.org> wrote:\r
62 > > Run notmuch new pre and post hooks, named "pre-new" and "post-new", if\r
63 > > present in the notmuch hooks directory. The hooks will be run before and\r
64 > > after incorporating new messages to the database.\r
65 > > \r
66 > > Typical use cases for pre-new and post-new hooks are fetching or delivering\r
67 > > new mail to the maildir, and custom tagging of the mail incorporated to the\r
68 > > database.\r
69 > > \r
70 > > Also add command line option --no-hooks to notmuch new to bypass the\r
71 > > hooks.\r
72\r
73 > A useful extension would be providing the list of added message-ids to the\r
74 > post-new hook, one per line? Or maybe the script wants added, moved,\r
75 > deleted ...\r
76 \r
77 Hi Tom -\r
78 \r
79 I have thought about passing arguments (or stdin) to the hooks, but IMHO\r
80 for now we're better off starting with plain hooks, gathering some\r
81 experience, and doing such extensions later on to get them right. It's\r
82 easier to add arguments than to change them.\r
83 \r
84 I think it was you who told me of the idea of initial tagging with "new"\r
85 and then processing all those messages in a tagging script. I think this\r
86 approach is still very good and valid with hooks, and probably more\r
87 robust than message-id passing too (the hooks must be run before opening\r
88 and after closing the database, and the hooks might get\r
89 interrupted). Passing plenty of message-ids might be a bit heavy if they\r
90 end up not being used after all.\r
91 \r
92 BR,\r
93 Jani.\r