1 Return-Path: <pieter@praet.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 1E830431FD0
\r
6 for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 02:47:30 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 os3sdpnMuM8p for <notmuch@notmuchmail.org>;
\r
16 Mon, 4 Jul 2011 02:47:28 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
18 [74.125.82.181]) (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 309BA431FB6
\r
21 for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 02:47:28 -0700 (PDT)
\r
22 Received: by wyh22 with SMTP id 22so3829167wyh.26
\r
23 for <notmuch@notmuchmail.org>; Mon, 04 Jul 2011 02:47:27 -0700 (PDT)
\r
24 Received: by 10.227.164.79 with SMTP id d15mr5344373wby.62.1309772846875;
\r
25 Mon, 04 Jul 2011 02:47:26 -0700 (PDT)
\r
26 Received: from localhost ([109.131.160.67])
\r
27 by mx.google.com with ESMTPS id fu18sm4338991wbb.27.2011.07.04.02.47.25
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Mon, 04 Jul 2011 02:47:26 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org
\r
32 Subject: Re: [PATCH v2] emacs: add insisible space after the search widget
\r
33 field in notmuch-hello
\r
34 In-Reply-To: <87r56676qs.fsf@gmail.com>
\r
35 References: <id:1309762025-1172-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
36 <1309768024-14584-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
37 <8762nifmrq.fsf@praet.org> <87r56676qs.fsf@gmail.com>
\r
38 User-Agent: Notmuch/0.5-326-ga5de9f3 (http://notmuchmail.org) Emacs/23.1.50.1
\r
39 (x86_64-pc-linux-gnu)
\r
40 Date: Mon, 04 Jul 2011 11:47:24 +0200
\r
41 Message-ID: <87wrfys7gz.fsf@praet.org>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Mon, 04 Jul 2011 09:47:30 -0000
\r
58 On Mon, 04 Jul 2011 13:08:43 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
\r
59 > On Mon, 04 Jul 2011 10:55:21 +0200, Pieter Praet <pieter@praet.org> wrote:
\r
60 > > On Mon, 4 Jul 2011 12:27:04 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
\r
61 > > > It is very convenient when C-e (bound to `widget-end-of-line') ignores
\r
62 > > > trailing spaces inside the search widget. But it only does so if a
\r
63 > > > widget is not followed by a newline (that is why it works in the saved
\r
64 > > > search widgets). The patch just adds an insisible space after the
\r
65 > > > search widget to get the desirable behavior of `widget-end-of-line'.
\r
67 > > > Previous behavior of C-e:
\r
69 > > > Search: [text _]
\r
73 > > > Search: [text_ ]
\r
75 > > > The extra space is also added to expected results of emacs tests.
\r
78 > > > Amended version with a better commit message. Stolen from a similar
\r
79 > > > patch by Kan-Ru Chen [1] as suggested by Pieter Praet :)
\r
86 > > > [1] id:"1280195325-9066-2-git-send-email-kanru@kanru.info"
\r
88 > > > emacs/notmuch-hello.el | 4 ++++
\r
89 > > > test/emacs.expected-output/notmuch-hello | 2 +-
\r
90 > > > .../notmuch-hello-no-saved-searches | 2 +-
\r
91 > > > .../emacs.expected-output/notmuch-hello-with-empty | 2 +-
\r
92 > > > 4 files changed, 7 insertions(+), 3 deletions(-)
\r
94 > > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
95 > > > index 65fde75..1a76c30 100644
\r
96 > > > --- a/emacs/notmuch-hello.el
\r
97 > > > +++ b/emacs/notmuch-hello.el
\r
98 > > > @@ -462,6 +462,10 @@ Complete list of currently available key bindings:
\r
99 > > > (length "Search: ")))
\r
100 > > > :action (lambda (widget &rest ignore)
\r
101 > > > (notmuch-hello-search (widget-value widget))))
\r
102 > > > + ;; add an invisible space to make `widget-end-of-line' ignore
\r
103 > > > + ;; trailine spaces in the search widget field
\r
104 > > > + (widget-insert " ")
\r
105 > > > + (put-text-property (1- (point)) (point) 'invisible t)
\r
106 > > > (widget-insert "\n")
\r
108 > > > (when notmuch-hello-recent-searches
\r
109 > > > diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello
\r
110 > > > index 64b7e42..48143bd 100644
\r
111 > > > --- a/test/emacs.expected-output/notmuch-hello
\r
112 > > > +++ b/test/emacs.expected-output/notmuch-hello
\r
113 > > > @@ -4,7 +4,7 @@ Saved searches: [edit]
\r
115 > > > 50 inbox 50 unread
\r
120 > > > [Show all tags]
\r
122 > > > diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
123 > > > index 7f8206a..7c09e40 100644
\r
124 > > > --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
125 > > > +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
126 > > > @@ -1,6 +1,6 @@
\r
127 > > > Welcome to notmuch. You have 50 messages.
\r
132 > > > [Show all tags]
\r
134 > > > diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty
\r
135 > > > index a9ed630..2a267c9 100644
\r
136 > > > --- a/test/emacs.expected-output/notmuch-hello-with-empty
\r
137 > > > +++ b/test/emacs.expected-output/notmuch-hello-with-empty
\r
138 > > > @@ -4,7 +4,7 @@ Saved searches: [edit]
\r
140 > > > 50 inbox 50 unread 0 empty
\r
145 > > > [Show all tags]
\r
150 > > > _______________________________________________
\r
151 > > > notmuch mailing list
\r
152 > > > notmuch@notmuchmail.org
\r
153 > > > http://notmuchmail.org/mailman/listinfo/notmuch
\r
155 > > Signed-off-by: Pieter Praet <pieter@praet.org>
\r
158 > > Would this be the right place to promote two of your previous patches [1,2] ?
\r
160 > > They serve as ears when using eye protection against `show-trailing-whitespace'.
\r
163 > I am glad somebody uses it except for me :) I use them exactly for the
\r
166 > They are not ready for mainline. Two issues:
\r
168 > * Poor commit message should be improved to make Carl happy.
\r
170 Rather skimpy indeed (as in non-existent) but I think the mere act of
\r
171 inserting "\n" at the right point in their titles would provide a fairly
\r
172 descriptive commit msg.
\r
174 > * I have wrote them long ago, and I am not sure it is a proper
\r
175 > implementation. I need to double check that before asking Carl to
\r
176 > push it. Or somebody else with a better elisp knowledge should review
\r
179 > I have been delaying this for some time. Since now I know somebody
\r
180 > actually uses it, I may get to it sooner rather than later. But no
\r
183 No promises? I demand a full refund!
\r
185 > BTW I am not really sure that hooks are the best solution for turning
\r
186 > off `show-trailing-whitespace'. Perhaps there is a better way? Would
\r
187 > appreciate comments. (Though, hooks would be useful anyway.)
\r
189 I (humbly) assert that hooks cure both the sniffles and cancer.
\r
191 Why install a sink, when one could instead provide the means to install
\r
192 an entire kitchen? People *will* reciprocate with patches for mainline,
\r
193 as previous threads have thoroughly proven. Even more so, I'd argue,
\r
194 since experimentation is facilitated.
\r
205 > > [1] id:"1278000507-22290-5-git-send-email-dmitry.kurochkin@gmail.com"
\r
206 > > [2] id:"1278000507-22290-6-git-send-email-dmitry.kurochkin@gmail.com"
\r