Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / b6 / 3718c0938cdc79dd091a68a87d93ba36f3a3a5
1 Return-Path: <bremner@tethera.net>\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 BE44A431FBD\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Feb 2014 06:25:35 -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 tests=[none]\r
12         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 gKdHtWkvNPwv for <notmuch@notmuchmail.org>;\r
16         Sat,  8 Feb 2014 06:25:28 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id D97BE431FBC\r
21         for <notmuch@notmuchmail.org>; Sat,  8 Feb 2014 06:25:27 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tethera.net>)\r
24         id 1WC8qV-0003Cr-Ea; Sat, 08 Feb 2014 10:25:27 -0400\r
25 Received: (nullmailer pid 2779 invoked by uid 1000); Sat, 08 Feb 2014\r
26         14:25:23 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [PATCH] emacs: remove newlines from input to notmuch count --batch\r
30 Date: Sat,  8 Feb 2014 10:25:17 -0400\r
31 Message-Id: <1391869517-2742-1-git-send-email-david@tethera.net>\r
32 X-Mailer: git-send-email 1.8.5.2\r
33 In-Reply-To: <m2sirzj3k0.fsf@guru.guru-group.fi>\r
34 References: <m2sirzj3k0.fsf@guru.guru-group.fi>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Sat, 08 Feb 2014 14:25:40 -0000\r
48 \r
49 Since a newline starts a new query in batch mode, this causes\r
50 mysterious crashes in the emacs interface if saved searches contain\r
51 newlines.  See the discussion at\r
52 \r
53       id:87wqhcxb5j.fsf@maritornes.cs.unb.ca\r
54 \r
55 In general newlines seem to be just whitespace to the xapian query\r
56 parser, so this should be mainly harmless.\r
57 ---\r
58  emacs/notmuch-hello.el | 10 ++++++----\r
59  1 file changed, 6 insertions(+), 4 deletions(-)\r
60 \r
61 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
62 index 7b3d76b..e325cd3 100644\r
63 --- a/emacs/notmuch-hello.el\r
64 +++ b/emacs/notmuch-hello.el\r
65 @@ -399,10 +399,12 @@ options will be handled as specified for\r
66                              (third elem)\r
67                            (cdr elem))))\r
68         (insert\r
69 -        (notmuch-hello-filtered-query count-query\r
70 -                                      (or (plist-get options :filter-count)\r
71 -                                          (plist-get options :filter)))\r
72 -        "\n")))\r
73 +        (replace-regexp-in-string\r
74 +         "\n" " "\r
75 +         (notmuch-hello-filtered-query count-query\r
76 +                                       (or (plist-get options :filter-count)\r
77 +                                           (plist-get options :filter))))\r
78 +         "\n")))\r
79  \r
80      (unless (= (call-process-region (point-min) (point-max) notmuch-command\r
81                                     t t nil "count" "--batch") 0)\r
82 -- \r
83 1.8.5.2\r
84 \r