1 Return-Path: <tomi.ollila@nixu.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 D8A4D429E26
\r
6 for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:15:53 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 32+I5a5gT8nY for <notmuch@notmuchmail.org>;
\r
16 Mon, 12 Dec 2011 02:15:51 -0800 (PST)
\r
17 Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 22936429E25
\r
21 for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:15:50 -0800 (PST)
\r
22 Received: from pps.filterd (mail-gw3 [127.0.0.1])
\r
23 by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id pBCADsxf004008;
\r
24 Mon, 12 Dec 2011 12:15:45 +0200
\r
25 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
26 by mail-gw3.nixu.fi with ESMTP id 114cs0st1t-1
\r
27 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
28 Mon, 12 Dec 2011 12:15:45 +0200
\r
29 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
30 by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id
\r
31 pBCAFiXf025162; Mon, 12 Dec 2011 12:15:44 +0200
\r
32 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
33 To: Austin Clements <amdragon@MIT.EDU>, Jani Nikula <jani@nikula.org>
\r
34 Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script
\r
35 In-Reply-To: <20111212003103.GI2760@mit.edu>
\r
36 References: <1323640100-18326-1-git-send-email-jani@nikula.org>
\r
37 <87wra26a5u.fsf@gmail.com> <20111211225822.GH2760@mit.edu>
\r
38 <CAB+hUn-ADRtZRCq5Ad6H6R2L246EBR8hOSsk4B2yeRsH4kN16w@mail.gmail.com>
\r
39 <20111212003103.GI2760@mit.edu>
\r
40 User-Agent: Notmuch/0.10.2+93~g631d290 (http://notmuchmail.org) Emacs/23.3.1
\r
42 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
43 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
44 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
45 Date: Mon, 12 Dec 2011 12:15:44 +0200
\r
46 Message-ID: <yf6wra2m6y7.fsf@taco2.nixu.fi>
\r
48 Content-Type: text/plain; charset=us-ascii
\r
49 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,
\r
50 1.0.211, 0.0.0000 definitions=2011-12-12_02:2011-12-12, 2011-12-12,
\r
51 1970-01-01 signatures=0
\r
52 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
\r
53 ipscore=0 suspectscore=0
\r
54 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0
\r
56 scancount=1 engine=6.0.2-1012030000 definitions=main-1112120033
\r
57 Cc: notmuch@notmuchmail.org
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Mon, 12 Dec 2011 10:15:54 -0000
\r
72 On Sun, 11 Dec 2011 19:31:03 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
\r
74 > So here's another idea, prefaced with a rant.
\r
76 > It's bothered me for a long time that notmuch-emacs didn't just know
\r
77 > by default how to check for new mail. What MUA doesn't know how to
\r
78 > check for new mail? Why does a new user of notmuch have to tell it
\r
79 > how to check for new mail? Of course, this *had* to be configured
\r
80 > before because everyone had their own way of checking for new mail.
\r
81 > Hooks eliminate this unnecessary flexibility and make "notmuch new"
\r
82 > the one true way to check for new mail---as it ought to be---and in
\r
83 > turn make the notmuch-poll-script variable obsolete.
\r
85 > So, what about changing the default "" setting of notmuch-poll-script
\r
86 > from meaning "do nothing and be useless" to meaning "run notmuch new
\r
87 > (using notmuch-command)"? It will then automatically do the right
\r
88 > thing for new users, while still being backward-compatible and
\r
89 > allowing an escape hatch for bizarre situations.
\r
93 So, it could work like this:
\r
95 (defun notmuch-poll ()
\r
98 (if (stringp notmuch notmuch-poll-script)
\r
99 (if (string= notmuch-poll-script "")
\r
100 (call-process notmuch-command nil nil nil "new")
\r
101 (call-process notmuch-poll-script))))
\r
103 I.e. in case notmuch-poll-script == nil, (or not string)
\r
104 do nothing. In case notmuch-poll-script == "" execute notmuch new
\r
105 and if notmuch-poll-script is string with content execute that.
\r
107 users who want other functionality can reimplement notmuch-poll function
\r
108 after notmuch has been loaded (and manage things themselves when internal
\r
109 implementation changes ;().
\r