[PATCH] configure: add --without-docs switch
[notmuch-archives.git] / 07 / 12deb304807beacd42966d6d223fee6cf3d65d
1 Return-Path: <awg@lagos.xvx.ca>\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 1613D429E29\r
6         for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 16:22:14 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 EszVyofaMSdh for <notmuch@notmuchmail.org>;\r
16         Wed,  8 Feb 2012 16:22:09 -0800 (PST)\r
17 Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9])\r
18         by olra.theworths.org (Postfix) with ESMTP id 8466F431FB6\r
19         for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 16:22:08 -0800 (PST)\r
20 Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd5ml2no-ssvc.prod.shaw.ca)\r
21         ([10.0.144.222])\r
22         by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 08 Feb 2012 17:22:07 -0700\r
23 X-Cloudmark-SP-Filtered: true\r
24 X-Cloudmark-SP-Result: v=1.1 cv=m05oFQ/DU99dGqsFIml08suKTIzCBvSA/J37eL+THWw=\r
25         c=1 sm=1\r
26         a=XZnVC6i01O4A:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
27         a=H4IEW4q-AAAA:8 a=7343-z1_AAAA:8 a=V2sgnzSHAAAA:8 a=SuFOw32sAAAA:8\r
28         a=pGLkceISAAAA:8 a=uZvujYp8AAAA:8 a=_ctWjzdLAAAA:8\r
29         a=DT5hYQGO3e35CuGonQwA:9\r
30         a=33CnLLHsIwVcUVB9S7cA:7 a=0BPXsuqt4rsA:10 a=-xelrQF7p3AA:10\r
31         a=Kw4u8EAyA4wA:10 a=0c-eHkXYtrgA:10 a=Gb7Eya4fYr0A:10 a=MSl-tDqOz04A:10\r
32         a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
33 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
34         by pd5ml2no-dmz.prod.shaw.ca with ESMTP; 08 Feb 2012 17:22:07 -0700\r
35 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
36         id B4278802AF80; Wed,  8 Feb 2012 17:22:07 -0700 (MST)\r
37 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH v4 4/4] emacs: Use the new JSON reply format and\r
40         message-cite-original\r
41 Date: Wed,  8 Feb 2012 17:21:56 -0700\r
42 Message-Id: <1328746916-25447-5-git-send-email-awg+notmuch@xvx.ca>\r
43 X-Mailer: git-send-email 1.7.5.4\r
44 In-Reply-To: <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca>\r
45 References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca>\r
46         <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca>\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Thu, 09 Feb 2012 00:22:14 -0000\r
60 \r
61 Using the new JSON reply format allows emacs to quote HTML parts\r
62 nicely by using mm-display-part to turn them into displayable text,\r
63 then quoting them with message-cite-original. This is very useful for\r
64 users who regularly receive HTML-only email.\r
65 \r
66 Use message-mode's message-cite-original function to create the\r
67 quoted body for reply messages. In order to make this act like the\r
68 existing notmuch defaults, you will need to set the following in\r
69 your emacs configuration:\r
70 \r
71 message-citation-line-format "On %a, %d %b %Y, %f wrote:"\r
72 message-citation-line-function 'message-insert-formatted-citation-line\r
73 \r
74 The test has been updated to reflect the (ugly) emacs default.\r
75 ---\r
76  emacs/notmuch-lib.el  |   39 ++++++++++++++\r
77  emacs/notmuch-mua.el  |  136 +++++++++++++++++++++++++++++++++++--------------\r
78  emacs/notmuch-show.el |   24 +--------\r
79  test/emacs            |  101 +++++++++++++++++++++++++++++++++++-\r
80  4 files changed, 237 insertions(+), 63 deletions(-)\r
81 \r
82 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
83 index d315f76..3fc7aff 100644\r
84 --- a/emacs/notmuch-lib.el\r
85 +++ b/emacs/notmuch-lib.el\r
86 @@ -21,6 +21,8 @@\r
87  \r
88  ;; This is an part of an emacs-based interface to the notmuch mail system.\r
89  \r
90 +(eval-when-compile (require 'cl))\r
91 +\r
92  (defvar notmuch-command "notmuch"\r
93    "Command to run the notmuch binary.")\r
94  \r
95 @@ -173,6 +175,43 @@ the user hasn't set this variable with the old or new value."\r
96    (list 'when (< emacs-major-version 23)\r
97         form))\r
98  \r
99 +(defun notmuch-split-content-type (content-type)\r
100 +  "Split content/type into 'content' and 'type'"\r
101 +  (split-string content-type "/"))\r
102 +\r
103 +(defun notmuch-match-content-type (t1 t2)\r
104 +  "Return t if t1 and t2 are matching content types, taking wildcards into account"\r
105 +  (let ((st1 (notmuch-split-content-type t1))\r
106 +       (st2 (notmuch-split-content-type t2)))\r
107 +    (if (or (string= (cadr st1) "*")\r
108 +           (string= (cadr st2) "*"))\r
109 +       (string= (car st1) (car st2))\r
110 +      (string= t1 t2))))\r
111 +\r
112 +(defvar notmuch-multipart/alternative-discouraged\r
113 +  '(\r
114 +    ;; Avoid HTML parts.\r
115 +    "text/html"\r
116 +    ;; multipart/related usually contain a text/html part and some associated graphics.\r
117 +    "multipart/related"\r
118 +    ))\r
119 +\r
120 +(defun notmuch-multipart/alternative-choose (types)\r
121 +  "Return a list of preferred types from the given list of types"\r
122 +  ;; Based on `mm-preferred-alternative-precedence'.\r
123 +  (let ((seq types))\r
124 +    (dolist (pref (reverse notmuch-multipart/alternative-discouraged))\r
125 +      (dolist (elem (copy-sequence seq))\r
126 +       (when (string-match pref elem)\r
127 +         (setq seq (nconc (delete elem seq) (list elem))))))\r
128 +    seq))\r
129 +\r
130 +(defun notmuch-parts-filter-by-type (parts type)\r
131 +  "Given a vector of message parts, return a vector containing the ones matching the given type."\r
132 +  (loop for part across parts\r
133 +       if (notmuch-match-content-type (cdr (assq 'content-type part)) type)\r
134 +       vconcat (list part)))\r
135 +\r
136  ;; Compatibility functions for versions of emacs before emacs 23.\r
137  ;;\r
138  ;; Both functions here were copied from emacs 23 with the following copyright:\r
139 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
140 index 4be7c13..da0d54c 100644\r
141 --- a/emacs/notmuch-mua.el\r
142 +++ b/emacs/notmuch-mua.el\r
143 @@ -19,11 +19,15 @@\r
144  ;;\r
145  ;; Authors: David Edmondson <dme@dme.org>\r
146  \r
147 +(require 'json)\r
148  (require 'message)\r
149 +(require 'format-spec)\r
150  \r
151  (require 'notmuch-lib)\r
152  (require 'notmuch-address)\r
153  \r
154 +(eval-when-compile (require 'cl))\r
155 +\r
156  ;;\r
157  \r
158  (defcustom notmuch-mua-send-hook '(notmuch-mua-message-send-hook)\r
159 @@ -72,56 +76,110 @@ list."\r
160             (push header message-hidden-headers)))\r
161         notmuch-mua-hidden-headers))\r
162  \r
163 +(defun notmuch-mua-get-displayed-part (part query-string)\r
164 +  (with-temp-buffer\r
165 +    (if (assq 'content part)\r
166 +       (insert (cdr (assq 'content part)))\r
167 +      (call-process notmuch-command nil t nil "show" "--format=raw"\r
168 +                   (format "--part=%s" (cdr (assq 'id part)))\r
169 +                   query-string))\r
170 +\r
171 +    (let ((handle (mm-make-handle (current-buffer) (list (cdr (assq 'content-type part)))))\r
172 +         (end-of-orig (point-max)))\r
173 +      (mm-display-part handle)\r
174 +      (delete-region (point-min) end-of-orig)\r
175 +      (buffer-substring (point-min) (point-max)))))\r
176 +\r
177 +(defun notmuch-mua-multipart/*-to-list (parts)\r
178 +  (loop for part across parts\r
179 +       collect (cdr (assq 'content-type part))))\r
180 +\r
181 +(defun notmuch-mua-get-quotable-parts (parts)\r
182 +  (loop for part across parts\r
183 +       if (notmuch-match-content-type (cdr (assq 'content-type part)) "multipart/alternative")\r
184 +         append (let* ((subparts (cdr (assq 'content part)))\r
185 +                       (types (notmuch-mua-multipart/*-to-list subparts))\r
186 +                       (chosen-type (car (notmuch-multipart/alternative-choose types))))\r
187 +                  (notmuch-mua-get-quotable-parts (notmuch-parts-filter-by-type subparts chosen-type)))\r
188 +       else if (notmuch-match-content-type (cdr (assq 'content-type part)) "multipart/*")\r
189 +         append (notmuch-mua-get-quotable-parts (cdr (assq 'content part)))\r
190 +       else if (notmuch-match-content-type (cdr (assq 'content-type part)) "text/*")\r
191 +         collect part))\r
192 +\r
193  (defun notmuch-mua-reply (query-string &optional sender reply-all)\r
194 -  (let (headers\r
195 -       body\r
196 -       (args '("reply")))\r
197 -    (if notmuch-show-process-crypto\r
198 -       (setq args (append args '("--decrypt"))))\r
199 +  (let ((reply-args '("reply" "--format=json"))\r
200 +       (show-args '("show" "--format=json" "--part=0"))\r
201 +       reply\r
202 +       original\r
203 +       body)\r
204 +    (when notmuch-show-process-crypto\r
205 +      (setq reply-args (append reply-args '("--decrypt")))\r
206 +      (setq show-args (append show-args '("--decrypt"))))\r
207 +\r
208      (if reply-all\r
209 -       (setq args (append args '("--reply-to=all")))\r
210 -      (setq args (append args '("--reply-to=sender"))))\r
211 -    (setq args (append args (list query-string)))\r
212 -    ;; This make assumptions about the output of `notmuch reply', but\r
213 -    ;; really only that the headers come first followed by a blank\r
214 -    ;; line and then the body.\r
215 +       (setq reply-args (append reply-args '("--reply-to=all")))\r
216 +      (setq reply-args (append reply-args '("--reply-to=sender"))))\r
217 +\r
218 +    (setq reply-args (append reply-args (list query-string)))\r
219 +    (setq show-args (append show-args (list query-string)))\r
220 +\r
221 +    ;; Get the reply object as JSON, and parse it into an elisp object.\r
222      (with-temp-buffer\r
223 -      (apply 'call-process (append (list notmuch-command nil (list t t) nil) args))\r
224 +      (apply 'call-process (append (list notmuch-command nil (list t t) nil) reply-args))\r
225        (goto-char (point-min))\r
226 -      (if (re-search-forward "^$" nil t)\r
227 -         (save-excursion\r
228 -           (save-restriction\r
229 -             (narrow-to-region (point-min) (point))\r
230 -             (goto-char (point-min))\r
231 -             (setq headers (mail-header-extract)))))\r
232 -      (forward-line 1)\r
233 -      (setq body (buffer-substring (point) (point-max))))\r
234 -    ;; If sender is non-nil, set the From: header to its value.\r
235 -    (when sender\r
236 -      (mail-header-set 'from sender headers))\r
237 -    (let\r
238 -       ;; Overlay the composition window on that being used to read\r
239 -       ;; the original message.\r
240 -       ((same-window-regexps '("\\*mail .*")))\r
241 -      (notmuch-mua-mail (mail-header 'to headers)\r
242 -                       (mail-header 'subject headers)\r
243 -                       (message-headers-to-generate headers t '(to subject))))\r
244 -    ;; insert the message body - but put it in front of the signature\r
245 -    ;; if one is present\r
246 -    (goto-char (point-max))\r
247 -    (if (re-search-backward message-signature-separator nil t)\r
248 +      (setq reply (json-read)))\r
249 +\r
250 +    ;; Get the original message object as JSON, and parse it into an elisp object.\r
251 +    (with-temp-buffer\r
252 +      (apply 'call-process (append (list notmuch-command nil (list t t) nil) show-args))\r
253 +      (goto-char (point-min))\r
254 +      (setq original (json-read)))\r
255 +\r
256 +    ;; Start with the prelude, based on the headers of the original message.\r
257 +    (let* ((original-headers (cdr (assq 'headers original)))\r
258 +          (reply-headers (cdr (assq 'reply reply))))\r
259 +\r
260 +      ;; If sender is non-nil, set the From: header to its value.\r
261 +      (when sender\r
262 +       (mail-header-set 'from sender reply-headers))\r
263 +      (let\r
264 +         ;; Overlay the composition window on that being used to read\r
265 +         ;; the original message.\r
266 +         ((same-window-regexps '("\\*mail .*")))\r
267 +       (notmuch-mua-mail (mail-header 'to reply-headers)\r
268 +                         (mail-header 'subject reply-headers)\r
269 +                         (message-headers-to-generate reply-headers t '(to subject))))\r
270 +      ;; insert the message body - but put it in front of the signature\r
271 +      ;; if one is present\r
272 +      (goto-char (point-max))\r
273 +      (if (re-search-backward message-signature-separator nil t)\r
274           (forward-line -1)\r
275 -      (goto-char (point-max)))\r
276 -    (insert body)\r
277 -    (push-mark))\r
278 -  (set-buffer-modified-p nil)\r
279 +       (goto-char (point-max)))\r
280 +\r
281 +      (let ((from (cdr (assq 'From original-headers)))\r
282 +           (date (cdr (assq 'Date original-headers)))\r
283 +           (start (point)))\r
284 +\r
285 +       (insert "From: " from "\n")\r
286 +       (insert "Date: " date "\n\n")\r
287 +\r
288 +       (let ((quotable-parts (notmuch-mua-get-quotable-parts (cdr (assq 'body original)))))\r
289 +         (mapc (lambda (part)\r
290 +                 (insert (notmuch-mua-get-displayed-part part query-string)))\r
291 +               quotable-parts))\r
292 +\r
293 +       (push-mark)\r
294 +       (goto-char start)\r
295 +       (message-cite-original))))\r
296  \r
297 +  (push-mark)\r
298    (message-goto-body)\r
299    ;; Original message may contain (malicious) MML tags.  We must\r
300    ;; properly quote them in the reply.  Note that using `point-max'\r
301    ;; instead of `mark' here is wrong.  The buffer may include user's\r
302    ;; signature which should not be MML-quoted.\r
303 -  (mml-quote-region (point) (mark)))\r
304 +  (mml-quote-region (point) (mark))\r
305 +  (set-buffer-modified-p nil))\r
306  \r
307  (defun notmuch-mua-forward-message ()\r
308    (message-forward)\r
309 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
310 index 24fde05..fc5d704 100644\r
311 --- a/emacs/notmuch-show.el\r
312 +++ b/emacs/notmuch-show.el\r
313 @@ -482,30 +482,13 @@ current buffer, if possible."\r
314             (mm-display-part handle)\r
315             t))))))\r
316  \r
317 -(defvar notmuch-show-multipart/alternative-discouraged\r
318 -  '(\r
319 -    ;; Avoid HTML parts.\r
320 -    "text/html"\r
321 -    ;; multipart/related usually contain a text/html part and some associated graphics.\r
322 -    "multipart/related"\r
323 -    ))\r
324 -\r
325  (defun notmuch-show-multipart/*-to-list (part)\r
326    (mapcar (lambda (inner-part) (plist-get inner-part :content-type))\r
327           (plist-get part :content)))\r
328  \r
329 -(defun notmuch-show-multipart/alternative-choose (types)\r
330 -  ;; Based on `mm-preferred-alternative-precedence'.\r
331 -  (let ((seq types))\r
332 -    (dolist (pref (reverse notmuch-show-multipart/alternative-discouraged))\r
333 -      (dolist (elem (copy-sequence seq))\r
334 -       (when (string-match pref elem)\r
335 -         (setq seq (nconc (delete elem seq) (list elem))))))\r
336 -    seq))\r
337 -\r
338  (defun notmuch-show-insert-part-multipart/alternative (msg part content-type nth depth declared-type)\r
339    (notmuch-show-insert-part-header nth declared-type content-type nil)\r
340 -  (let ((chosen-type (car (notmuch-show-multipart/alternative-choose (notmuch-show-multipart/*-to-list part))))\r
341 +  (let ((chosen-type (car (notmuch-multipart/alternative-choose (notmuch-show-multipart/*-to-list part))))\r
342         (inner-parts (plist-get part :content))\r
343         (start (point)))\r
344      ;; This inserts all parts of the chosen type rather than just one,\r
345 @@ -744,9 +727,6 @@ current buffer, if possible."\r
346  \r
347  ;; Functions for determining how to handle MIME parts.\r
348  \r
349 -(defun notmuch-show-split-content-type (content-type)\r
350 -  (split-string content-type "/"))\r
351 -\r
352  (defun notmuch-show-handlers-for (content-type)\r
353    "Return a list of content handlers for a part of type CONTENT-TYPE."\r
354    (let (result)\r
355 @@ -757,7 +737,7 @@ current buffer, if possible."\r
356           (list (intern (concat "notmuch-show-insert-part-*/*"))\r
357                 (intern (concat\r
358                          "notmuch-show-insert-part-"\r
359 -                        (car (notmuch-show-split-content-type content-type))\r
360 +                        (car (notmuch-split-content-type content-type))\r
361                          "/*"))\r
362                 (intern (concat "notmuch-show-insert-part-" content-type))))\r
363      result))\r
364 diff --git a/test/emacs b/test/emacs\r
365 index b74cfa9..e6c718f 100755\r
366 --- a/test/emacs\r
367 +++ b/test/emacs\r
368 @@ -268,11 +268,107 @@ Subject: Re: Testing message sent via SMTP\r
369  In-Reply-To: <XXX>\r
370  Fcc: $(pwd)/mail/sent\r
371  --text follows this line--\r
372 -On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
373 +Notmuch Test Suite <test_suite@notmuchmail.org> writes:\r
374 +\r
375  > This is a test that messages are sent via SMTP\r
376  EOF\r
377  test_expect_equal_file OUTPUT EXPECTED\r
378  \r
379 +test_begin_subtest "Reply within emacs to a multipart/mixed message"\r
380 +test_emacs '(notmuch-show "id:20091118002059.067214ed@hikari")\r
381 +               (notmuch-show-reply)\r
382 +               (test-output)'\r
383 +cat <<EOF >EXPECTED\r
384 +From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
385 +To: Adrian Perez de Castro <aperez@igalia.com>, notmuch@notmuchmail.org\r
386 +Subject: Re: [notmuch] Introducing myself\r
387 +In-Reply-To: <20091118002059.067214ed@hikari>\r
388 +Fcc: ${MAIL_DIR}/sent\r
389 +--text follows this line--\r
390 +Adrian Perez de Castro <aperez@igalia.com> writes:\r
391 +\r
392 +> Hello to all,\r
393 +>\r
394 +> I have just heard about Not Much today in some random Linux-related news\r
395 +> site (LWN?), my name is Adrian Perez and I work as systems administrator\r
396 +> (although I can do some code as well :P). I have always thought that the\r
397 +> ideas behind Sup were great, but after some time using it, I got tired of\r
398 +> the oddities that it has. I also do not like doing things like having to\r
399 +> install Ruby just for reading and sorting mails. Some time ago I thought\r
400 +> about doing something like Not Much and in fact I played a bit with the\r
401 +> Python+Xapian and the Python+Whoosh combinations, because I find relaxing\r
402 +> to code things in Python when I am not working and also it is installed\r
403 +> by default on most distribution. I got to have some mailboxes indexed and\r
404 +> basic searching working a couple of months ago. Lately I have been very\r
405 +> busy and had no time for coding, and them... boom! Not Much appears -- and\r
406 +> it is almost exactly what I was trying to do, but faster. I have been\r
407 +> playing a bit with Not Much today, and I think it has potential.\r
408 +>\r
409 +> Also, I would like to share one idea I had in mind, that you might find\r
410 +> interesting: One thing I have found very annoying is having to re-tag my\r
411 +> mail when the indexes get b0rked (it happened a couple of times to me while\r
412 +> using Sup), so I was planning to mails as read/unread and adding the tags\r
413 +> not just to the index, but to the mail text itself, e.g. by adding a\r
414 +> "X-Tags" header field or by reusing the "Keywords" one. This way, the index\r
415 +> could be totally recreated by re-reading the mail directories, and this\r
416 +> would also allow to a tools like OfflineIMAP [1] to get the mails into a\r
417 +> local maildir, tagging and indexing the mails with the e-mail reader and\r
418 +> then syncing back the messages with the "X-Tags" header to the IMAP server.\r
419 +> This would allow to use the mail reader from a different computer and still\r
420 +> have everything tagged finely.\r
421 +>\r
422 +> Best regards,\r
423 +>\r
424 +>\r
425 +> ---\r
426 +> [1] http://software.complete.org/software/projects/show/offlineimap\r
427 +>\r
428 +> -- \r
429 +> Adrian Perez de Castro <aperez@igalia.com>\r
430 +> Igalia - Free Software Engineering\r
431 +> _______________________________________________\r
432 +> notmuch mailing list\r
433 +> notmuch@notmuchmail.org\r
434 +> http://notmuchmail.org/mailman/listinfo/notmuch\r
435 +EOF\r
436 +test_expect_equal_file OUTPUT EXPECTED\r
437 +\r
438 +test_begin_subtest "Reply within emacs to a multipart/alternative message"\r
439 +test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")\r
440 +               (notmuch-show-reply)\r
441 +               (test-output)'\r
442 +cat <<EOF >EXPECTED\r
443 +From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
444 +To: Alex Botero-Lowry <alex.boterolowry@gmail.com>, notmuch@notmuchmail.org\r
445 +Subject: Re: [notmuch] preliminary FreeBSD support\r
446 +In-Reply-To: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>\r
447 +Fcc: ${MAIL_DIR}/sent\r
448 +--text follows this line--\r
449 +Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:\r
450 +\r
451 +> I saw the announcement this morning, and was very excited, as I had been\r
452 +> hoping sup would be turned into a library,\r
453 +> since I like the concept more than the UI (I'd rather an emacs interface).\r
454 +>\r
455 +> I did a preliminary compile which worked out fine, but\r
456 +> sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns -1 on\r
457 +> FreeBSD, so notmuch_config_open segfaulted.\r
458 +>\r
459 +> Attached is a patch that supplies a default buffer size of 64 in cases where\r
460 +> -1 is returned.\r
461 +>\r
462 +> http://www.opengroup.org/austin/docs/austin_328.txt - seems to indicate this\r
463 +> is acceptable behavior,\r
464 +> and http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/07/msg016808.htmlspecifically\r
465 +> uses 64 as the\r
466 +> buffer size.\r
467 +> _______________________________________________\r
468 +> notmuch mailing list\r
469 +> notmuch@notmuchmail.org\r
470 +> http://notmuchmail.org/mailman/listinfo/notmuch\r
471 +EOF\r
472 +test_expect_equal_file OUTPUT EXPECTED\r
473 +\r
474  test_begin_subtest "Quote MML tags in reply"\r
475  message_id='test-emacs-mml-quoting@message.id'\r
476  add_message [id]="$message_id" \\r
477 @@ -288,7 +384,8 @@ Subject: Re: Quote MML tags in reply\r
478  In-Reply-To: <test-emacs-mml-quoting@message.id>\r
479  Fcc: ${MAIL_DIR}/sent\r
480  --text follows this line--\r
481 -On Fri, 05 Jan 2001 15:43:57 +0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
482 +Notmuch Test Suite <test_suite@notmuchmail.org> writes:\r
483 +\r
484  > <#!part disposition=inline>\r
485  EOF\r
486  test_expect_equal_file OUTPUT EXPECTED\r
487 -- \r
488 1.7.5.4\r
489 \r