Re: notmuch-emacs: forward messages inline
[notmuch-archives.git] / da / dfd59adab4ba274323dad36e1c77fedd1cd488
1 Return-Path: <tomi.ollila@iki.fi>\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 1E98F431FBD\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Feb 2014 10:31:31 -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 1+J+UfApdreY for <notmuch@notmuchmail.org>;\r
16         Sat,  8 Feb 2014 10:31:25 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 871F3431FBC\r
19         for <notmuch@notmuchmail.org>; Sat,  8 Feb 2014 10:31:25 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id B89DC100033;\r
22         Sat,  8 Feb 2014 20:31:17 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] emacs: remove newlines from input to notmuch count\r
26  --batch\r
27 In-Reply-To: <1391869517-2742-1-git-send-email-david@tethera.net>\r
28 References: <m2sirzj3k0.fsf@guru.guru-group.fi>\r
29         <1391869517-2742-1-git-send-email-david@tethera.net>\r
30 User-Agent: Notmuch/0.17+69~g761b031 (http://notmuchmail.org) Emacs/24.3.1\r
31         (x86_64-unknown-linux-gnu)\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
33         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
34         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
35 Date: Sat, 08 Feb 2014 20:31:17 +0200\r
36 Message-ID: <m2a9e1sbgq.fsf@guru.guru-group.fi>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sat, 08 Feb 2014 18:31:31 -0000\r
52 \r
53 On Sat, Feb 08 2014, David Bremner <david@tethera.net> wrote:\r
54 \r
55 > Since a newline starts a new query in batch mode, this causes\r
56 > mysterious crashes in the emacs interface if saved searches contain\r
57 > newlines.  See the discussion at\r
58 >\r
59 >       id:87wqhcxb5j.fsf@maritornes.cs.unb.ca\r
60 >\r
61 > In general newlines seem to be just whitespace to the xapian query\r
62 > parser, so this should be mainly harmless.\r
63 > ---\r
64 \r
65 LGTM.\r
66 \r
67 Tomi\r
68 \r
69 \r
70 >  emacs/notmuch-hello.el | 10 ++++++----\r
71 >  1 file changed, 6 insertions(+), 4 deletions(-)\r
72 >\r
73 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
74 > index 7b3d76b..e325cd3 100644\r
75 > --- a/emacs/notmuch-hello.el\r
76 > +++ b/emacs/notmuch-hello.el\r
77 > @@ -399,10 +399,12 @@ options will be handled as specified for\r
78 >                            (third elem)\r
79 >                          (cdr elem))))\r
80 >       (insert\r
81 > -      (notmuch-hello-filtered-query count-query\r
82 > -                                    (or (plist-get options :filter-count)\r
83 > -                                        (plist-get options :filter)))\r
84 > -      "\n")))\r
85 > +      (replace-regexp-in-string\r
86 > +       "\n" " "\r
87 > +       (notmuch-hello-filtered-query count-query\r
88 > +                                     (or (plist-get options :filter-count)\r
89 > +                                         (plist-get options :filter))))\r
90 > +       "\n")))\r
91 >  \r
92 >      (unless (= (call-process-region (point-min) (point-max) notmuch-command\r
93 >                                   t t nil "count" "--batch") 0)\r
94 > -- \r
95 > 1.8.5.2\r
96 >\r
97 > _______________________________________________\r
98 > notmuch mailing list\r
99 > notmuch@notmuchmail.org\r
100 > http://notmuchmail.org/mailman/listinfo/notmuch\r