RE: [PATCH] Add Travis-CI config file.
[notmuch-archives.git] / 23 / f54e391300a5ff70bd2d61886ee87d29cd968a
1 Return-Path: <jani@nikula.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 C8B45431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 07:13:12 -0700 (PDT)\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 SG+sn24pCGau for <notmuch@notmuchmail.org>;\r
16         Thu, 29 Mar 2012 07:13:12 -0700 (PDT)\r
17 Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com\r
18         [209.85.216.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 0F933431FAE\r
21         for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 07:13:12 -0700 (PDT)\r
22 Received: by qadc11 with SMTP id c11so124027qad.5\r
23         for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 07:13:10 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type:x-gm-message-state;\r
28         bh=366vsB9IN8iXqjgp2BNCRN50x9e8I2V+HTvMft6/KBs=;\r
29         b=Ub4HUldc7zaHF/aYfWqOa9BDODUNVrW2Qr7qYFtwtjoV73uhjFIlDUKBTR5PDWbzqI\r
30         I14GQe3DaQIIVS0Tku600p4FT95kREO5+rQWLlSowInl52+IMs/RWXTDNxjsimd/x021\r
31         x8VicJ/c/OaFvV2san0BomuBiybXuDxfepFUgQMlFda4X7CzHkRA4jAExnE9xSkAar6m\r
32         pXqHGrwXpVHByfJbHcU4OI3to24keGRaj4X/WauYm6Tja6Ec3KnTeekC2ZKs72kc79Xm\r
33         gTnT5OIwNDnLzpThRwtQeVlD8YBW2+pHzXmc9v3a2NGgB7bYxJudU2Zr2mkDNeJuqdiW\r
34         DbPg==\r
35 Received: by 10.229.77.36 with SMTP id e36mr12995489qck.138.1333030389983;\r
36         Thu, 29 Mar 2012 07:13:09 -0700 (PDT)\r
37 Received: from localhost (nikula.org. [92.243.24.172])\r
38         by mx.google.com with ESMTPS id i19sm12578484qad.19.2012.03.29.07.13.07\r
39         (version=SSLv3 cipher=OTHER); Thu, 29 Mar 2012 07:13:08 -0700 (PDT)\r
40 From: Jani Nikula <jani@nikula.org>\r
41 To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch@notmuchmail.org\r
42 Subject: Re: [BUG/PATCH] emacs: Fix header problem in reply for emacs 23.2\r
43 In-Reply-To: <1332943338-9708-1-git-send-email-awg+notmuch@xvx.ca>\r
44 References: <87obrh3ufi.fsf@nikula.org>\r
45         <1332943338-9708-1-git-send-email-awg+notmuch@xvx.ca>\r
46 User-Agent: Notmuch/0.11.1+222~ga47a98c (http://notmuchmail.org) Emacs/23.1.1\r
47         (i686-pc-linux-gnu)\r
48 Date: Thu, 29 Mar 2012 14:13:05 +0000\r
49 Message-ID: <87398rebri.fsf@nikula.org>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 X-Gm-Message-State:\r
53  ALoCoQk6jZ5ER2Zxjiu7bOBVWE90A2WhSi0kMZrp2ODBPzxMtmV96LtgEV7B2iJCssv0ut9Ywp7I\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\r
57 List-Id: "Use and development of the notmuch mail system."\r
58         <notmuch.notmuchmail.org>\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
62 List-Post: <mailto:notmuch@notmuchmail.org>\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
66 X-List-Received-Date: Thu, 29 Mar 2012 14:13:13 -0000\r
67 \r
68 On Wed, 28 Mar 2012 08:02:18 -0600, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:\r
69 > The new reply code used strings instead of symbols for header names,\r
70 > which message-mail is OK with on emacs 23.3, but not 23.2. The symptom\r
71 > is that on 23.2 (and presumably on earlier versions) the reply message\r
72 > would end up with two of some headers.\r
73\r
74 > This fixes the problem by converting the header names to symbols of\r
75 > the type message.el usually expects before passing the headers to\r
76 > message-mail.\r
77 \r
78 The patch depends on some set of the other reply fixes (*), so I applied\r
79 this on top of them. All tests pass with emacs 23.2.\r
80 \r
81 Unfortunately, the emacs UI fails with "Symbol's function definition is\r
82 void: remove-if" when trying to reply. After a manual (require 'cl) the\r
83 UI seems to otherwise work as expected. This is probably unrelated to\r
84 this particular patch, but why is it a (eval-when-compile (require 'cl))\r
85 and not (require 'cl) in notmuch-mua.el?\r
86 \r
87 \r
88 BR,\r
89 Jani.\r
90 \r
91 \r
92 (*)\r
93 id:"1332941635-21019-2-git-send-email-awg+notmuch@xvx.ca"\r
94 id:"1332941635-21019-3-git-send-email-awg+notmuch@xvx.ca"\r
95 id:"1332996818-15700-1-git-send-email-awg+notmuch@xvx.ca"\r
96 \r
97 > ---\r
98 >  emacs/notmuch-lib.el |    5 ++++-\r
99 >  emacs/notmuch-mua.el |   10 +++++-----\r
100 >  2 files changed, 9 insertions(+), 6 deletions(-)\r
101\r
102 > diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
103 > index c146748..af46611 100644\r
104 > --- a/emacs/notmuch-lib.el\r
105 > +++ b/emacs/notmuch-lib.el\r
106 > @@ -232,9 +232,12 @@ the given type."\r
107 >    (or (plist-get part :content)\r
108 >        (notmuch-get-bodypart-internal (concat "id:" (plist-get msg :id)) nth process-crypto)))\r
109 >  \r
110 > +;; Converts a plist of headers to an alist of headers. The input plist should\r
111 > +;; have symbols of the form :Header as keys, and the resulting alist will have\r
112 > +;; symbols of the form 'Header as keys.\r
113 >  (defun notmuch-plist-to-alist (plist)\r
114 >    (loop for (key value . rest) on plist by #'cddr\r
115 > -     collect (cons (substring (symbol-name key) 1) value)))\r
116 > +     collect (cons (intern (substring (symbol-name key) 1)) value)))\r
117 >  \r
118 >  ;; Compatibility functions for versions of emacs before emacs 23.\r
119 >  ;;\r
120 > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
121 > index 9805d79..24918d3 100644\r
122 > --- a/emacs/notmuch-mua.el\r
123 > +++ b/emacs/notmuch-mua.el\r
124 > @@ -185,11 +185,11 @@ OTHER-ARGS are passed through to `message-mail'."\r
125 >    (when notmuch-mua-user-agent-function\r
126 >      (let ((user-agent (funcall notmuch-mua-user-agent-function)))\r
127 >        (when (not (string= "" user-agent))\r
128 > -     (push (cons "User-Agent" user-agent) other-headers))))\r
129 > +     (push (cons 'User-Agent user-agent) other-headers))))\r
130 >  \r
131 > -  (unless (assoc "From" other-headers)\r
132 > -    (push (cons "From" (concat\r
133 > -                     (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
134 > +  (unless (assq 'From other-headers)\r
135 > +    (push (cons 'From (concat\r
136 > +                    (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
137 >  \r
138 >    (apply #'message-mail to subject other-headers other-args)\r
139 >    (message-sort-headers)\r
140 > @@ -250,7 +250,7 @@ the From: address first."\r
141 >    (interactive "P")\r
142 >    (let ((other-headers\r
143 >        (when (or prompt-for-sender notmuch-always-prompt-for-sender)\r
144 > -        (list (cons "From" (notmuch-mua-prompt-for-sender))))))\r
145 > +        (list (cons 'From (notmuch-mua-prompt-for-sender))))))\r
146 >      (notmuch-mua-mail nil nil other-headers)))\r
147 >  \r
148 >  (defun notmuch-mua-new-forward-message (&optional prompt-for-sender)\r
149 > -- \r
150 > 1.7.5.4\r
151\r