Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / b9 / 2c1acdedafb04aa64449e87a6576ae78fb35fa
1 Return-Path: <awg@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 17C82431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 17 Feb 2012 18:22:10 -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 JfwEsjjJqwNF for <notmuch@notmuchmail.org>;\r
16         Fri, 17 Feb 2012 18:22:09 -0800 (PST)\r
17 Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
18         [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 5F2C1431FAE\r
21         for <notmuch@notmuchmail.org>; Fri, 17 Feb 2012 18:22:09 -0800 (PST)\r
22 Received: by lahd3 with SMTP id d3so4645976lah.26\r
23         for <notmuch@notmuchmail.org>; Fri, 17 Feb 2012 18:22:07 -0800 (PST)\r
24 Received-SPF: pass (google.com: domain of awg@xvx.ca designates 10.152.123.68\r
25         as permitted sender) client-ip=10.152.123.68; \r
26 Authentication-Results: mr.google.com;\r
27         spf=pass (google.com: domain of awg@xvx.ca designates\r
28         10.152.123.68 as permitted sender) smtp.mail=awg@xvx.ca\r
29 Received: from mr.google.com ([10.152.123.68])\r
30         by 10.152.123.68 with SMTP id ly4mr8237667lab.13.1329531727932\r
31         (num_hops = 1); Fri, 17 Feb 2012 18:22:07 -0800 (PST)\r
32 MIME-Version: 1.0\r
33 Received: by 10.152.123.68 with SMTP id ly4mr6879914lab.13.1329531727829; Fri,\r
34         17 Feb 2012 18:22:07 -0800 (PST)\r
35 Sender: awg@xvx.ca\r
36 Received: by 10.112.90.20 with HTTP; Fri, 17 Feb 2012 18:22:07 -0800 (PST)\r
37 X-Originating-IP: [96.52.216.56]\r
38 In-Reply-To: <20120217200017.GG5991@mit.edu>\r
39 References: <1329361957-28493-1-git-send-email-awg+notmuch@xvx.ca>\r
40         <1329361957-28493-8-git-send-email-awg+notmuch@xvx.ca>\r
41         <20120217200017.GG5991@mit.edu>\r
42 Date: Fri, 17 Feb 2012 19:22:07 -0700\r
43 X-Google-Sender-Auth: FxZHoDEOlYKfKKDBHysktGvvlKg\r
44 Message-ID:\r
45  <CAMoJFUs5jnu7=5PtrNib9J6P_FnxD8bK2L+oQiBdgXPJXhvMJg@mail.gmail.com>\r
46 Subject: Re: [PATCH v5.2 7/7] emacs: Use the new JSON reply format and\r
47         message-cite-original\r
48 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
49 To: Austin Clements <amdragon@mit.edu>\r
50 Content-Type: text/plain; charset=ISO-8859-1\r
51 Content-Transfer-Encoding: quoted-printable\r
52 X-Gm-Message-State:\r
53  ALoCoQnC4Wnr2Z5GwLVPvuX+ioA2RiG3XgCKSOVmiTkJ8hSCk5LevU3T0EOObbUvY1lIvZbCIJ9J\r
54 Cc: notmuch@notmuchmail.org\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Sat, 18 Feb 2012 02:22:10 -0000\r
68 \r
69 On Fri, Feb 17, 2012 at 13:00, Austin Clements <amdragon@mit.edu> wrote:\r
70 > One general comment that affects a lot of things in this patch: I\r
71 > think you should use the same JSON parsing settings that\r
72 > notmuch-query-get-threads uses. =A0Besides consistency and more\r
73 > opportunities for code reuse, using lists instead of vectors for JSON\r
74 > arrays will simplify a lot of this code without any drawbacks.\r
75 \r
76 I pretty much agree. The only reason I stuck with alists was, as you\r
77 mention below, to be compatible with certain mail functions. Given the\r
78 things you've pointed out, I think the small hassle of making those\r
79 work with plists is worthwhile, so I'll give it a go.\r
80 \r
81 Clarification on a couple of things follow, otherwise I'll make all\r
82 these changes for the next version.\r
83 \r
84 >> + =A0 =A0 (goto-char (point-max)))\r
85 >> +\r
86 >> + =A0 =A0 =A0(let ((from (cdr (assq 'From original-headers)))\r
87 >> + =A0 =A0 =A0 =A0 (date (cdr (assq 'Date original-headers)))\r
88 >> + =A0 =A0 =A0 =A0 (start (point)))\r
89 >> +\r
90 >> + =A0 =A0 (insert "From: " from "\n")\r
91 >> + =A0 =A0 (insert "Date: " date "\n\n")\r
92 >\r
93 > Sorry; I'm having trouble following the diff. =A0What are the inserts\r
94 > for?\r
95 \r
96 The function message-cite-original cites an original message, which is\r
97 in the marked region. It assumes the headers of the original message\r
98 will be part of the marked region, but the only ones it actually uses\r
99 are From and Date.\r
100 \r
101 This could probably use a comment in the code.\r
102 \r
103 >> + =A0 =A0 (push-mark)\r
104 >\r
105 > It's unfortunate that message-cite-original depends on the mark.\r
106 > Since you're about to push the mark for the user anyway, maybe this\r
107 > should be a set-mark so that only one mark gets pushed?\r
108 \r
109 Probably the right thing to do.\r
110 \r
111 >> + =A0 =A0 (goto-char start)\r
112 >> + =A0 =A0 ;; Quote the original message according to the user's configur=\r
113 ed style.\r
114 >> + =A0 =A0 (message-cite-original))))\r
115 >\r
116 > message-cite-original-without-signature?\r
117 \r
118 Perhaps it should be configurable (notmuch-reply-cite-function or\r
119 somesuch). I believe message-cite-original matches the behavior of the\r
120 old reply, which didn't strip signatures, but I don't have strong\r
121 feelings either way.\r
122 \r
123 >> + =A0(push-mark)\r
124 >\r
125 > Is message-cite-original guaranteed to leave point in a reasonable\r
126 > place for this or should we create our own marker above (probably\r
127 > after the if re-search-backward..) and use it here to get point to the\r
128 > right place?\r
129 \r
130 In my experience, it leaves the point at the end of the quoted region,\r
131 but the documentation doesn't make any guarantees. Probably safer to\r
132 set a marker.\r