Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers
[notmuch-archives.git] / f9 / fa27f136d8e442f3d5a9341ab5ac6cbe0a307e
1 Return-Path: <dme@dme.org>\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 7D860429E5F\r
6         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 22:54:45 -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 sUhvKdPM1By4 for <notmuch@notmuchmail.org>;\r
16         Tue, 17 Jan 2012 22:54:44 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  6BE96429E27    for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 22:54:44 -0800\r
21  (PST)\r
22 Received: by wgbdr13 with SMTP id dr13so2027271wgb.2\r
23         for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 22:54:41 -0800 (PST)\r
24 Received: by 10.180.104.5 with SMTP id ga5mr28717602wib.21.1326869681576;\r
25         Tue, 17 Jan 2012 22:54:41 -0800 (PST)\r
26 Received: from hotblack-desiato.hh.sledj.net\r
27         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
28         by mx.google.com with ESMTPS id em13sm20798658wid.7.2012.01.17.22.54.39\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Tue, 17 Jan 2012 22:54:40 -0800 (PST)\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
32         id 2FEF1A0A7A; Wed, 18 Jan 2012 06:54:38 +0000 (GMT)\r
33 To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch <notmuch@notmuchmail.org>\r
34 Subject: Re: [PATCH v2 4/5] emacs: Use the new JSON reply format.\r
35 In-Reply-To: <1326840818-6821-1-git-send-email-awg+notmuch@xvx.ca>\r
36 References: <cuny5t6r97c.fsf@hotblack-desiato.hh.sledj.net>\r
37         <1326840818-6821-1-git-send-email-awg+notmuch@xvx.ca>\r
38 User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1\r
39         (x86_64-pc-linux-gnu)\r
40 From: David Edmondson <dme@dme.org>\r
41 Date: Wed, 18 Jan 2012 06:54:34 +0000\r
42 Message-ID: <cunty3to5zp.fsf@hotblack-desiato.hh.sledj.net>\r
43 MIME-Version: 1.0\r
44 Content-Type: multipart/signed; boundary="=-=-=";\r
45         micalg=pgp-sha1; protocol="application/pgp-signature"\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Wed, 18 Jan 2012 06:54:46 -0000\r
59 \r
60 --=-=-=\r
61 Content-Type: text/plain\r
62 \r
63 On Tue, 17 Jan 2012 15:53:37 -0700, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:\r
64 > +(defun notmuch-parts-filter-by-type (parts type)\r
65 > +  "Return a list of message parts with the given type"\r
66 > +  (let (result)\r
67 > +    (dolist (part (append parts nil) result)\r
68 > +      (if (string= (cdr (assq 'content-type part)) type)\r
69 > +       (setq result (append result (list (cdr (assq 'content part)))))))\r
70 > +    result))\r
71 \r
72 I still think that `loop' is easier to read :-) But no objection to this\r
73 code.\r
74 \r
75 > +(defun notmuch-mua-insert-part-quoted (part)\r
76 > +  (let ((start (point))\r
77 > +     limit)\r
78 > +    (insert part)\r
79 > +    (setq limit (point))\r
80 > +    (goto-char start)\r
81 > +    (while (re-search-forward "\\(^\\)[^$]" limit 0)\r
82 > +      (replace-match "> " nil nil nil 1)\r
83 > +      ;; We have added two characters to the quotable region\r
84 > +      (setq limit (+ limit 2)))\r
85 > +    (set-buffer-modified-p nil)))\r
86 \r
87 You could use a marker for the limit, as it would then move along\r
88 automagically (sorry for not noticing this last time).\r
89 \r
90 --=-=-=\r
91 Content-Type: application/pgp-signature\r
92 \r
93 -----BEGIN PGP SIGNATURE-----\r
94 Version: GnuPG v1.4.11 (GNU/Linux)\r
95 \r
96 iEYEARECAAYFAk8WbKoACgkQaezQq/BJZRaIOwCfWBzhCeYDQngWBitS5Ownuxl2\r
97 lGsAnjRw1bCYKz5fr7lvKSzcLqFG6EZI\r
98 =HDkg\r
99 -----END PGP SIGNATURE-----\r
100 --=-=-=--\r