Re: notmuch and "mute" -- useful to anyone?
[notmuch-archives.git] / d4 / e3481ea97b1dbb2917d4c2ebfea71a252942c0
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 0A17A429E26\r
6         for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 16:39:44 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id qoAnJB7eCJcG for <notmuch@notmuchmail.org>;\r
17         Sun, 11 Dec 2011 16:39:42 -0800 (PST)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B3734429E25\r
22         for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 16:39:41 -0800 (PST)\r
23 Received: by bkat8 with SMTP id t8so5175596bka.26\r
24         for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 16:39:38 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type:content-transfer-encoding;\r
28         bh=zepvW4d1l8N81LY4bcdCG8lOKGU+McwdxfoHvY8ObXw=;\r
29         b=nbRgtTc1Z9PK/W8Cz99gGreTQmHqikmWkuuvOQqiJ7L41ibiXHzyVzmGn2HQQDPQmN\r
30         s/1twNNvgGIdZNoMmbD5r3ZmF72Wp1gzAtiYFHHhYx1gVFDD9o9k86+YWGqC4cm1aJw3\r
31         Om+cxJfpwXOZx+yKifUhLUXywiro1kl7tnd0o=\r
32 Received: by 10.205.122.70 with SMTP id gf6mr1912499bkc.48.1323650378737;\r
33         Sun, 11 Dec 2011 16:39:38 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id l5sm27581092bkv.9.2011.12.11.16.39.37\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sun, 11 Dec 2011 16:39:38 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Austin Clements <amdragon@MIT.EDU>, Jani Nikula <jani@nikula.org>\r
40 Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script\r
41 In-Reply-To: <20111212003103.GI2760@mit.edu>\r
42 References: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
43         <87wra26a5u.fsf@gmail.com> <20111211225822.GH2760@mit.edu>\r
44         <CAB+hUn-ADRtZRCq5Ad6H6R2L246EBR8hOSsk4B2yeRsH4kN16w@mail.gmail.com>\r
45         <20111212003103.GI2760@mit.edu>\r
46 User-Agent: Notmuch/0.10.2+94~g948b41d (http://notmuchmail.org) Emacs/23.3.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Mon, 12 Dec 2011 04:39:03 +0400\r
49 Message-ID: <87fwgqfwt4.fsf@gmail.com>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=utf-8\r
52 Content-Transfer-Encoding: quoted-printable\r
53 Cc: notmuch@notmuchmail.org\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\r
57 List-Id: "Use and development of the notmuch mail system."\r
58         <notmuch.notmuchmail.org>\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
62 List-Post: <mailto:notmuch@notmuchmail.org>\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
66 X-List-Received-Date: Mon, 12 Dec 2011 00:39:44 -0000\r
67 \r
68 On Sun, 11 Dec 2011 19:31:03 -0500, Austin Clements <amdragon@MIT.EDU> wrot=\r
69 e:\r
70 > Quoth Jani Nikula on Dec 12 at  1:10 am:\r
71 > >    On Dec 12, 2011 12:56 AM, "Austin Clements" <[1]amdragon@mit.edu> wr=\r
72 ote:\r
73 > >    >\r
74 > >    > Quoth Dmitry Kurochkin on Dec 12 at =C2=A02:00 am:\r
75 > >    > > Hi Jani.\r
76 > >    > >\r
77 > >    > > On Sun, 11 Dec 2011 23:48:20 +0200, Jani Nikula <[2]jani@nikula.=\r
78 org>\r
79 > >    wrote:\r
80 > >    > > > Let notmuch-poll-script be a function as well as a string. Make\r
81 > >    default\r
82 > >    > > > value nil instead of an empty string, but allow "" for backwar=\r
83 ds\r
84 > >    > > > compatibility. Add a notmuch poll function to call "notmuch ne=\r
85 w"\r
86 > >    using the\r
87 > >    > > > configured notmuch-command.\r
88 > >    > > >\r
89 > >    > > > This allows taking better advantage of the "notmuch new" hooks=\r
90  from\r
91 > >    emacs\r
92 > >    > > > without intermediate scripts.\r
93 > >    > > >\r
94 > >    > >\r
95 > >    > > I was just thinking about working on this myself :)\r
96 > >    > >\r
97 > >    > > I think a better solution would be to allow running a command wi=\r
98 th\r
99 > >    > > arguments. =C2=A0Creating a elisp function just to run a command=\r
100  with some\r
101 > >    > > parameters feels wrong. =C2=A0This way we would have to add anot=\r
102 her\r
103 > >    function\r
104 > >    > > each time we want to add another argument.\r
105 > >    >\r
106 > >    > This seems a little awkward to me, too, though perhaps it's the be=\r
107 st\r
108 > >    > way. =C2=A0Other approaches to consider include accepting a list f=\r
109 or\r
110 > >    > notmuch-poll-script (e.g., ("notmuch" "new")) or leaving it as a\r
111 > >    > string but treating it as a shell command so "notmuch new" would J=\r
112 ust\r
113 > >    > Work. =C2=A0Personally, I think the latter is the most intuitive, =\r
114 but it\r
115 > >    > would be worth looking at how other customizable external commands=\r
116  are\r
117 > >    > done in Emacs.\r
118 > >    >\r
119 > >    > A function seems powerful, but also like overkill. =C2=A0Can you g=\r
120 ive a use\r
121 > >    > case for a function that wouldn't be more easily solved by one of =\r
122 the\r
123 > >    > above approaches?\r
124 > >=20\r
125 > >    The only reason I had for using a function was running notmuch using\r
126 > >    notmuch-command. Any ideas how to do that with the Just Works approa=\r
127 ch?\r
128 >=20\r
129 > Oh, I see.  I'd missed that.\r
130 >=20\r
131 > So here's another idea, prefaced with a rant.\r
132 >=20\r
133 > It's bothered me for a long time that notmuch-emacs didn't just know\r
134 > by default how to check for new mail.  What MUA doesn't know how to\r
135 > check for new mail?  Why does a new user of notmuch have to tell it\r
136 > how to check for new mail?  Of course, this *had* to be configured\r
137 > before because everyone had their own way of checking for new mail.\r
138 > Hooks eliminate this unnecessary flexibility and make "notmuch new"\r
139 > the one true way to check for new mail---as it ought to be---and in\r
140 > turn make the notmuch-poll-script variable obsolete.\r
141 >=20\r
142 > So, what about changing the default "" setting of notmuch-poll-script\r
143 > from meaning "do nothing and be useless" to meaning "run notmuch new\r
144 > (using notmuch-command)"?  It will then automatically do the right\r
145 > thing for new users, while still being backward-compatible and\r
146 > allowing an escape hatch for bizarre situations.\r
147 \r
148 Fine with me.  AFAIK no one has asked for using custom functions for\r
149 notmuch-poll-script, so adding a sane default may be the simplest and\r
150 the best option.\r
151 \r
152 Regards,\r
153   Dmitry\r