[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 41 / 0e6031b699d8f2c4d4c9c7ef58ba773058bc82
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 757E1429E25\r
6         for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 14:01:26 -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 kNYTfS1kfsNt for <notmuch@notmuchmail.org>;\r
17         Sun, 11 Dec 2011 14:01:22 -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 66A44431FB6\r
22         for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 14:01:22 -0800 (PST)\r
23 Received: by bkat8 with SMTP id t8so5100843bka.26\r
24         for <notmuch@notmuchmail.org>; Sun, 11 Dec 2011 14:01:20 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type;\r
28         bh=rk+3zV3GRXOJ67abum9B2ls8lr+N2BWJ/mIHvvDJ/J8=;\r
29         b=S3rdMxfxVdsKBPHWdHKgPmrwFjir+iYq/dYbrqPU1xy/eCsqMmKWdykgMDq2RUpq97\r
30         n58VjCN30C1BG66Vo5+sZaQOAjw/KNpf0EtfUndkfXKv5NbFoFWJdZZaJxT/CCdiX9PY\r
31         tFhHbjf5RWyw9WIO0IKPUkrpzXLTpfC+E7+1s=\r
32 Received: by 10.204.152.3 with SMTP id e3mr8796211bkw.70.1323640880628;\r
33         Sun, 11 Dec 2011 14:01:20 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id fa8sm26874060bkc.14.2011.12.11.14.01.19\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sun, 11 Dec 2011 14:01:20 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
40 Subject: Re: [PATCH] emacs: support "notmuch new" as a notmuch-poll-script\r
41 In-Reply-To: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
42 References: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
43 User-Agent: Notmuch/0.10.2+94~g948b41d (http://notmuchmail.org) Emacs/23.3.1\r
44         (x86_64-pc-linux-gnu)\r
45 Date: Mon, 12 Dec 2011 02:00:45 +0400\r
46 Message-ID: <87wra26a5u.fsf@gmail.com>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Sun, 11 Dec 2011 22:01:26 -0000\r
62 \r
63 Hi Jani.\r
64 \r
65 On Sun, 11 Dec 2011 23:48:20 +0200, Jani Nikula <jani@nikula.org> wrote:\r
66 > Let notmuch-poll-script be a function as well as a string. Make default\r
67 > value nil instead of an empty string, but allow "" for backwards\r
68 > compatibility. Add a notmuch poll function to call "notmuch new" using the\r
69 > configured notmuch-command.\r
70\r
71 > This allows taking better advantage of the "notmuch new" hooks from emacs\r
72 > without intermediate scripts.\r
73\r
74 \r
75 I was just thinking about working on this myself :)\r
76 \r
77 I think a better solution would be to allow running a command with\r
78 arguments.  Creating a elisp function just to run a command with some\r
79 parameters feels wrong.  This way we would have to add another function\r
80 each time we want to add another argument.\r
81 \r
82 Function support for notmuch-poll-script seems like a useful feature on\r
83 it's own.\r
84 \r
85 Regards,\r
86   Dmitry\r
87 \r
88 > Signed-off-by: Jani Nikula <jani@nikula.org>\r
89 > ---\r
90 >  emacs/notmuch.el |   44 ++++++++++++++++++++++++++++++++------------\r
91 >  1 files changed, 32 insertions(+), 12 deletions(-)\r
92\r
93 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
94 > index 8936149..6c7e800 100644\r
95 > --- a/emacs/notmuch.el\r
96 > +++ b/emacs/notmuch.el\r
97 > @@ -965,28 +965,48 @@ same relative position within the new buffer."\r
98 >      (notmuch-search query oldest-first target-thread target-line continuation)\r
99 >      (goto-char (point-min))))\r
100 >  \r
101 > -(defcustom notmuch-poll-script ""\r
102 > -  "An external script to incorporate new mail into the notmuch database.\r
103 > +(defcustom notmuch-poll-script nil\r
104 > +  "A script or a function to incorporate new mail into the notmuch database.\r
105 >  \r
106 > -If this variable is non empty, then it should name a script to be\r
107 > -invoked by `notmuch-search-poll-and-refresh-view' and\r
108 > -`notmuch-hello-poll-and-update' (each have a default keybinding\r
109 > -of 'G'). The script could do any of the following depending on\r
110 > +This variable can be set to a function or the name of an external\r
111 > +script to be invoked by `notmuch-search-poll-and-refresh-view'\r
112 > +and `notmuch-hello-poll-and-update' (each have a default\r
113 > +keybinding of 'G'). Set to nil to do nothing.\r
114 > +\r
115 > +The function or script could do any of the following depending on\r
116 >  the user's needs:\r
117 >  \r
118 >  1. Invoke a program to transfer mail to the local mail store\r
119 >  2. Invoke \"notmuch new\" to incorporate the new mail\r
120 > -3. Invoke one or more \"notmuch tag\" commands to classify the mail"\r
121 > -  :type 'string\r
122 > +3. Invoke one or more \"notmuch tag\" commands to classify the mail\r
123 > +\r
124 > +You can also choose to use \"notmuch new\" through the provided\r
125 > +`notmuch-poll-script-notmuch-new' function, and have the\r
126 > +\"notmuch new\" hooks perform the actions above."\r
127 > +  :type '(choice (const :tag "Not set" nil)\r
128 > +              (const :tag "Notmuch new" notmuch-poll-script-notmuch-new)\r
129 > +              (function :tag "Custom function"\r
130 > +                        :value notmuch-poll-script-notmuch-new)\r
131 > +              (string :tag "Custom script"))\r
132 >    :group 'notmuch)\r
133 >  \r
134 > +(defun notmuch-poll-script-notmuch-new ()\r
135 > +  "Run \"notmuch new\"."\r
136 > +  (call-process notmuch-command nil nil nil "new"))\r
137 > +\r
138 >  (defun notmuch-poll ()\r
139 > -  "Run external script to import mail.\r
140 > +  "Run external script or call a function to import mail.\r
141 >  \r
142 > -Invokes `notmuch-poll-script' if it is not set to an empty string."\r
143 > +Invokes `notmuch-poll-script', which can be a function or the\r
144 > +name of an external script. Does nothing if `notmuch-poll-script'\r
145 > +is nil or an empty string."\r
146 >    (interactive)\r
147 > -  (if (not (string= notmuch-poll-script ""))\r
148 > -      (call-process notmuch-poll-script nil nil)))\r
149 > +  (cond\r
150 > +   ((stringp notmuch-poll-script)\r
151 > +    (if (not (string= notmuch-poll-script "")) ;; for backwards compatibility\r
152 > +     (call-process notmuch-poll-script nil nil)))\r
153 > +   ((functionp notmuch-poll-script)\r
154 > +    (funcall notmuch-poll-script))))\r
155 >  \r
156 >  (defun notmuch-search-poll-and-refresh-view ()\r
157 >    "Invoke `notmuch-poll' to import mail, then refresh the current view."\r
158 > -- \r
159 > 1.7.5.4\r
160\r
161 > _______________________________________________\r
162 > notmuch mailing list\r
163 > notmuch@notmuchmail.org\r
164 > http://notmuchmail.org/mailman/listinfo/notmuch\r