[PATCH v6 4/6] Update devel/schemata for --entire-thread=false
[notmuch-archives.git] / 72 / e8f1d9f42cb176a07f96ae6bc76ea11bef8e8b
1 Return-Path: <amdragon@mit.edu>\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 E7627429E26\r
6         for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 12:23:19 -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 iIzN9QfD-aXr for <notmuch@notmuchmail.org>;\r
16         Mon, 12 Dec 2011 12:23:19 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU\r
18         [18.9.25.13])\r
19         by olra.theworths.org (Postfix) with ESMTP id 3BABA429E25\r
20         for <notmuch@notmuchmail.org>; Mon, 12 Dec 2011 12:23:19 -0800 (PST)\r
21 X-AuditID: 1209190d-b7f576d0000008c4-82-4ee662b6ea6f\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 91.C2.02244.6B266EE4; Mon, 12 Dec 2011 15:23:18 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBCKNHHJ013006; \r
27         Mon, 12 Dec 2011 15:23:18 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBCKNFjg011240\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Mon, 12 Dec 2011 15:23:16 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1RaCQb-00062o-Ra; Mon, 12 Dec 2011 15:24:49 -0500\r
37 Date: Mon, 12 Dec 2011 15:24:49 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Jani Nikula <jani@nikula.org>\r
40 Subject: Re: [PATCH v2] emacs: support "notmuch new" as a notmuch-poll-script\r
41 Message-ID: <20111212202449.GS2760@mit.edu>\r
42 References: <1323640100-18326-1-git-send-email-jani@nikula.org>\r
43         <1323719848-27958-1-git-send-email-jani@nikula.org>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Content-Disposition: inline\r
47 In-Reply-To: <1323719848-27958-1-git-send-email-jani@nikula.org>\r
48 User-Agent: Mutt/1.5.21 (2010-09-15)\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT192W9MzPoHG2kkXTdGeL6zdnMjsw\r
51         edy6/5rd49mqW8wBTFFcNimpOZllqUX6dglcGafPNTEXTJGpmHm6l7GB8YhYFyMHh4SAicS/\r
52         qUJdjJxAppjEhXvr2boYuTiEBPYxSjw+O48ZwtnAKHHo8BRmkCohgZNMEjOXm0EkljBKbOlr\r
53         A0uwCKhK3J3wnAnEZhPQkNi2fzkjiC0ioCix+eR+MJtZQFri2+9msBphAV+JRw9ms4DYvALa\r
54         EtO/fWCCWFAqsejmPGaIuKDEyZlPWCB6tSRu/HvJBHI1yJzl/zhAwpwCDhJLpq8BaxUVUJGY\r
55         cnIb2wRGoVlIumch6Z6F0L2AkXkVo2xKbpVubmJmTnFqsm5xcmJeXmqRrpFebmaJXmpK6SZG\r
56         UEhzSvLuYHx3UOkQowAHoxIPb6LvUz8h1sSy4srcQ4ySHExKorz3op75CfEl5adUZiQWZ8QX\r
57         leakFh9ilOBgVhLhjXUDyvGmJFZWpRblw6SkOViUxHlrdj30ExJITyxJzU5NLUgtgsnKcHAo\r
58         SfDWJgI1ChalpqdWpGXmlCCkmTg4QYbzAA23TgIZXlyQmFucmQ6RP8WoKCXOewqkWQAkkVGa\r
59         B9cLSzmvGMWBXhHmLQep4gGmK7juV0CDmYAGx6U8ARlckoiQkmpgrPG90PLGnyHTuYXzBNvx\r
60         fZGSgRYXrk5Ralmc3vDatDTTyY17U/ZJifomXbHOwj/Xjr3RKfc23FFpO8W5OPyo2amZS1xu\r
61         2m+P/1fjsFSyzTJ/zfM2qzs++wuWCrVbtKx9mbiiICpkQa7rN5fMz2H71i6anDr3/HOGs4pN\r
62         51Qcme37Kl1D955RYinOSDTUYi4qTgQAnxK1MxQDAAA=\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Mon, 12 Dec 2011 20:23:20 -0000\r
77 \r
78 Looks good to me.\r
79 \r
80 One documentation nitpick below.\r
81 \r
82 Quoth Jani Nikula on Dec 12 at  9:57 pm:\r
83 > Support nil value for notmuch-poll-script to run "notmuch new" instead of\r
84 > an external script, and make this the new default. "notmuch new" is run\r
85 > using the configured notmuch-command.\r
86\r
87 > This allows taking better advantage of the "notmuch new" hooks from emacs\r
88 > without intermediate scripts.\r
89\r
90 > Signed-off-by: Jani Nikula <jani@nikula.org>\r
91 > ---\r
92 >  emacs/notmuch.el |   34 ++++++++++++++++++++++++----------\r
93 >  1 files changed, 24 insertions(+), 10 deletions(-)\r
94\r
95 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
96 > index 8936149..5a8ab9d 100644\r
97 > --- a/emacs/notmuch.el\r
98 > +++ b/emacs/notmuch.el\r
99 > @@ -965,28 +965,42 @@ same relative position within the new buffer."\r
100 >      (notmuch-search query oldest-first target-thread target-line continuation)\r
101 >      (goto-char (point-min))))\r
102 >  \r
103 > -(defcustom notmuch-poll-script ""\r
104 > +(defcustom notmuch-poll-script nil\r
105 >    "An external script to incorporate new mail into the notmuch database.\r
106 >  \r
107 > -If this variable is non empty, then it should name a script to be\r
108 > -invoked by `notmuch-search-poll-and-refresh-view' and\r
109 > +This variable controls the action invoked by\r
110 > +`notmuch-search-poll-and-refresh-view' and\r
111 >  `notmuch-hello-poll-and-update' (each have a default keybinding\r
112 > -of 'G'). The script could do any of the following depending on\r
113 > +of 'G') to incorporate new mail into the notmuch database.\r
114 > +\r
115 > +If this variable is non empty, then it should name an external\r
116 > +script to be run. If set to an empty string, no action is\r
117 > +invoked. Finally, if set to nil (the default), \"notmuch new\" is\r
118 > +run using the command specified by `notmuch-command'.\r
119 \r
120 The default should probably be given first.  Also, "non empty" is a\r
121 bit confusing, since nothing has been said about it being a string at\r
122 that point.  So, perhaps something like\r
123 \r
124 If set to nil (the default), new mail is processed by invoking\r
125 \"notmuch new\".  Otherwise, this should be set to a string that gives\r
126 the name of an external script that processes new mail.  If set to the\r
127 empty string, no command will be run.\r
128 \r
129 > +\r
130 > +The external script could do any of the following depending on\r
131 >  the user's needs:\r
132 >  \r
133 >  1. Invoke a program to transfer mail to the local mail store\r
134 >  2. Invoke \"notmuch new\" to incorporate the new mail\r
135 > -3. Invoke one or more \"notmuch tag\" commands to classify the mail"\r
136 > -  :type 'string\r
137 > +3. Invoke one or more \"notmuch tag\" commands to classify the mail\r
138 > +\r
139 > +Note that the same can be achieved through \"notmuch new\" hooks."\r
140 > +  :type '(choice (const :tag "Notmuch new" nil)\r
141 > +              (const :tag "Disabled" "")\r
142 > +              (string :tag "Custom script"))\r
143 >    :group 'notmuch)\r
144 >  \r
145 >  (defun notmuch-poll ()\r
146 > -  "Run external script to import mail.\r
147 > +  "Run \"notmuch new\" or an external script to import mail.\r
148 >  \r
149 > -Invokes `notmuch-poll-script' if it is not set to an empty string."\r
150 > +Invokes `notmuch-poll-script', \"notmuch new\", or does nothing\r
151 > +depending on the value of `notmuch-poll-script'."\r
152 >    (interactive)\r
153 > -  (if (not (string= notmuch-poll-script ""))\r
154 > -      (call-process notmuch-poll-script nil nil)))\r
155 > +  (if (stringp notmuch-poll-script)\r
156 > +      (if (not (string= notmuch-poll-script ""))\r
157 > +       (call-process notmuch-poll-script nil nil))\r
158 > +    (call-process notmuch-command nil nil nil "new")))\r
159 >  \r
160 >  (defun notmuch-search-poll-and-refresh-view ()\r
161 >    "Invoke `notmuch-poll' to import mail, then refresh the current view."\r