Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5d / 0d92fae6cf9d76ead7a43c7c9cdc4acc77eb1a
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 102D7431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 10:04:05 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id f7VyfA7MxSsz for <notmuch@notmuchmail.org>;\r
17         Mon, 26 Mar 2012 10:04:04 -0700 (PDT)\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 5B617431FAE\r
22         for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 10:04:04 -0700 (PDT)\r
23 Received: by bkwj4 with SMTP id j4so4830945bkw.26\r
24         for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 10:04:03 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:date:message-id:mime-version\r
27         :content-type; bh=VLxhMZ73SDfOdjyV6ahbHx697yC2hNF4XWqPgKyQKDg=;\r
28         b=y78DAbBHtMsSS03utD5prCV/tCsrTlMOAoYAnZPcNk6wAlfUSsrYMLGeO9mdJRLDDK\r
29         0q5zrkUVHhcl5se9Sc4LTXL5umJWXTi4d8f9QRPHw34OJBObhYSU+0lTcrjOB7FX6at4\r
30         Da8kG+jWoB1EebL+20ZcU4hKNOWOOwOioROcF+G89+jy8BiXP05ceuc8Uhm5Yzxfg/Up\r
31         ga9q++f/3qYku5zsb9WteKeVqYOureJBcsKC9rE/79nzhgKA2x2MZl4Efgq7bOx0agXo\r
32         FbAukSQa/ZolEZcQX0DfqBHZ/5hO+TOofgUZbaL+O3uPtyA1sRXfHwsLtDVGaIsKI51Z\r
33         iQOQ==\r
34 Received: by 10.204.152.12 with SMTP id e12mr8870712bkw.29.1332781442982;\r
35         Mon, 26 Mar 2012 10:04:02 -0700 (PDT)\r
36 Received: from localhost ([91.144.186.21])\r
37         by mx.google.com with ESMTPS id u5sm33772259bka.5.2012.03.26.10.04.01\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Mon, 26 Mar 2012 10:04:02 -0700 (PDT)\r
40 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
41 To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch@notmuchmail.org\r
42 Subject: Re: [BUG/PATCH 2/2] emacs: Fix replying from alternate addresses\r
43 In-Reply-To: <1332635232-15269-3-git-send-email-awg+notmuch@xvx.ca>\r
44 References: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca>\r
45         <1332635232-15269-3-git-send-email-awg+notmuch@xvx.ca>User-Agent:\r
46         Notmuch/0.12+70~g06ecbeb (http://notmuchmail.org) Emacs/23.4.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Mon, 26 Mar 2012 21:02:25 +0400\r
49 Message-ID: <878vinjnxa.fsf@gmail.com>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Mon, 26 Mar 2012 17:04:05 -0000\r
65 \r
66 Adam Wolfe Gordon <awg+notmuch@xvx.ca> writes:\r
67 > The bug was that notmuch-mua-mail used `mail-header` to check whether\r
68 > it was passed a "From" header. The implementation of `mail-header`\r
69 > must try to compare symbols instead of strings when looking for\r
70 > headers, as it was returning nil when a From header was present. This\r
71 > is probably because the mail functions construct headers as alists\r
72 > with symbols for the header names, while our code uses strings for the\r
73 > header names.\r
74 >\r
75 > Since we don't use `mail-header` anywhere else, and `message-mail` is\r
76 > perfectly happy to accept string header names, the fix is just to use\r
77 > `assoc` to look for the From header, so that the strings get compared\r
78 > properly.\r
79 > ---\r
80 \r
81 LGTM.  Thanks for fixing this.\r
82 \r
83 Regards,\r
84   Dmitry\r
85 \r
86 >  emacs/notmuch-mua.el |    4 ++--\r
87 >  test/emacs           |    1 -\r
88 >  2 files changed, 2 insertions(+), 3 deletions(-)\r
89 >\r
90 > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
91 > index 6aae3a0..9805d79 100644\r
92 > --- a/emacs/notmuch-mua.el\r
93 > +++ b/emacs/notmuch-mua.el\r
94 > @@ -187,7 +187,7 @@ OTHER-ARGS are passed through to `message-mail'."\r
95 >        (when (not (string= "" user-agent))\r
96 >       (push (cons "User-Agent" user-agent) other-headers))))\r
97 >  \r
98 > -  (unless (mail-header 'From other-headers)\r
99 > +  (unless (assoc "From" other-headers)\r
100 >      (push (cons "From" (concat\r
101 >                       (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
102 >  \r
103 > @@ -250,7 +250,7 @@ the From: address first."\r
104 >    (interactive "P")\r
105 >    (let ((other-headers\r
106 >        (when (or prompt-for-sender notmuch-always-prompt-for-sender)\r
107 > -        (list (cons 'From (notmuch-mua-prompt-for-sender))))))\r
108 > +        (list (cons "From" (notmuch-mua-prompt-for-sender))))))\r
109 >      (notmuch-mua-mail nil nil other-headers)))\r
110 >  \r
111 >  (defun notmuch-mua-new-forward-message (&optional prompt-for-sender)\r
112 > diff --git a/test/emacs b/test/emacs\r
113 > index fa5d706..08db1ee 100755\r
114 > --- a/test/emacs\r
115 > +++ b/test/emacs\r
116 > @@ -275,7 +275,6 @@ EOF\r
117 >  test_expect_equal_file OUTPUT EXPECTED\r
118 >  \r
119 >  test_begin_subtest "Reply from alternate address within emacs"\r
120 > -test_subtest_known_broken\r
121 >  add_message '[from]="Sender <sender@example.com>"' \\r
122 >            [to]=test_suite_other@notmuchmail.org \\r
123 >            [subject]=notmuch-reply-test \\r
124 > -- \r
125 > 1.7.5.4\r
126 >\r
127 > _______________________________________________\r
128 > notmuch mailing list\r
129 > notmuch@notmuchmail.org\r
130 > http://notmuchmail.org/mailman/listinfo/notmuch\r