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 5970D429E26
\r
6 for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:22:32 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 hGnthQW-roak for <notmuch@notmuchmail.org>;
\r
17 Mon, 12 Dec 2011 02:22:31 -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 7F0A9429E25
\r
22 for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:22:31 -0800 (PST)
\r
23 Received: by bkat8 with SMTP id t8so5598427bka.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 02:22:30 -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;
\r
28 bh=nBF66l9+dDpv0s+OPusNq13T5XRSGHYf8G/BlTpVz5Q=;
\r
29 b=KdytxnlgtQEjrEh85uvr+9+tLZkcxbKrqvXwc6GvAatLHgZ07C9nOVZut7qiz3wsmI
\r
30 WAzdkS09C6u4htpyW+V7P9lE6pW3D1QF+TTIF0OLN3p54wMrVKYIqkYg0B/lWGp7mD6B
\r
31 fEsvCBjoXr+DdjC1R6sc+q31mZJxeqqUhd0uk=
\r
32 Received: by 10.205.127.65 with SMTP id gz1mr9812176bkc.106.1323685349930;
\r
33 Mon, 12 Dec 2011 02:22:29 -0800 (PST)
\r
34 Received: from localhost ([91.144.186.21])
\r
35 by mx.google.com with ESMTPS id h7sm30568330bkw.12.2011.12.12.02.22.28
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Mon, 12 Dec 2011 02:22:29 -0800 (PST)
\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
39 To: Tomi Ollila <tomi.ollila@iki.fi>, Austin Clements <amdragon@MIT.EDU>,
\r
40 Jani Nikula <jani@nikula.org>
\r
41 Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script
\r
42 In-Reply-To: <yf6wra2m6y7.fsf@taco2.nixu.fi>
\r
43 References: <1323640100-18326-1-git-send-email-jani@nikula.org>
\r
44 <87wra26a5u.fsf@gmail.com> <20111211225822.GH2760@mit.edu>
\r
45 <CAB+hUn-ADRtZRCq5Ad6H6R2L246EBR8hOSsk4B2yeRsH4kN16w@mail.gmail.com>
\r
46 <20111212003103.GI2760@mit.edu> <yf6wra2m6y7.fsf@taco2.nixu.fi>
\r
47 User-Agent: Notmuch/0.10.2+94~g948b41d (http://notmuchmail.org) Emacs/23.3.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Mon, 12 Dec 2011 14:21:53 +0400
\r
50 Message-ID: <87wra2ay4e.fsf@gmail.com>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 Cc: notmuch@notmuchmail.org
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\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 10:22:32 -0000
\r
68 On Mon, 12 Dec 2011 12:15:44 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
69 > On Sun, 11 Dec 2011 19:31:03 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
\r
71 > > So here's another idea, prefaced with a rant.
\r
73 > > It's bothered me for a long time that notmuch-emacs didn't just know
\r
74 > > by default how to check for new mail. What MUA doesn't know how to
\r
75 > > check for new mail? Why does a new user of notmuch have to tell it
\r
76 > > how to check for new mail? Of course, this *had* to be configured
\r
77 > > before because everyone had their own way of checking for new mail.
\r
78 > > Hooks eliminate this unnecessary flexibility and make "notmuch new"
\r
79 > > the one true way to check for new mail---as it ought to be---and in
\r
80 > > turn make the notmuch-poll-script variable obsolete.
\r
82 > > So, what about changing the default "" setting of notmuch-poll-script
\r
83 > > from meaning "do nothing and be useless" to meaning "run notmuch new
\r
84 > > (using notmuch-command)"? It will then automatically do the right
\r
85 > > thing for new users, while still being backward-compatible and
\r
86 > > allowing an escape hatch for bizarre situations.
\r
90 > So, it could work like this:
\r
92 > (defun notmuch-poll ()
\r
95 > (if (stringp notmuch notmuch-poll-script)
\r
96 > (if (string= notmuch-poll-script "")
\r
97 > (call-process notmuch-command nil nil nil "new")
\r
98 > (call-process notmuch-poll-script))))
\r
100 > I.e. in case notmuch-poll-script == nil, (or not string)
\r
101 > do nothing. In case notmuch-poll-script == "" execute notmuch new
\r
102 > and if notmuch-poll-script is string with content execute that.
\r
105 I think the following scheme would be slightly better and more
\r
108 * nil - run "notmuch new", the new default
\r
110 * "script" - run script
\r
115 > users who want other functionality can reimplement notmuch-poll function
\r
116 > after notmuch has been loaded (and manage things themselves when internal
\r
117 > implementation changes ;().
\r
121 > _______________________________________________
\r
122 > notmuch mailing list
\r
123 > notmuch@notmuchmail.org
\r
124 > http://notmuchmail.org/mailman/listinfo/notmuch
\r