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 5C598431FD0
\r
6 for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 02:08:53 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=1.7 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, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id 3zHYdtFETtNB for <notmuch@notmuchmail.org>;
\r
18 Mon, 4 Jul 2011 02:08:52 -0700 (PDT)
\r
19 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com
\r
20 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 207A0431FB6
\r
23 for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 02:08:51 -0700 (PDT)
\r
24 Received: by bwg12 with SMTP id 12so4604172bwg.26
\r
25 for <notmuch@notmuchmail.org>; Mon, 04 Jul 2011 02:08:50 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
27 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
28 :mime-version:content-type;
\r
29 bh=rfe4SVPNHL4Px8u6zzVVTjULj1IHHe+cGwHTsThcR/E=;
\r
30 b=GNjSjvI9hhT+xfGmf4G4eKgVzUN5e1WckAgd0Xq10/HwzZyfisNZdXoDQGI79J+92V
\r
31 BKvYdVzMc9kKU8xrIRRmVWSZp3hA+vnu0k5MWQC2L/wrRCuc4wsSyVdZjeBAcp1eKXT4
\r
32 c4lSx9ENb4OCu9YjtsHvmi0bcOv1YndOAhb7A=
\r
33 Received: by 10.204.42.18 with SMTP id q18mr2963bke.46.1309770530680;
\r
34 Mon, 04 Jul 2011 02:08:50 -0700 (PDT)
\r
35 Received: from localhost ([91.144.186.21])
\r
36 by mx.google.com with ESMTPS id k16sm5372009bks.13.2011.07.04.02.08.48
\r
37 (version=TLSv1/SSLv3 cipher=OTHER);
\r
38 Mon, 04 Jul 2011 02:08:49 -0700 (PDT)
\r
39 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
40 To: Pieter Praet <pieter@praet.org>, notmuch@notmuchmail.org
\r
41 Subject: Re: [PATCH v2] emacs: add insisible space after the search widget
\r
42 field in notmuch-hello
\r
43 In-Reply-To: <8762nifmrq.fsf@praet.org>
\r
44 References: <id:1309762025-1172-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
45 <1309768024-14584-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
46 <8762nifmrq.fsf@praet.org>
\r
47 User-Agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Mon, 04 Jul 2011 13:08:43 +0400
\r
50 Message-ID: <87r56676qs.fsf@gmail.com>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Mon, 04 Jul 2011 09:08:53 -0000
\r
67 On Mon, 04 Jul 2011 10:55:21 +0200, Pieter Praet <pieter@praet.org> wrote:
\r
68 > On Mon, 4 Jul 2011 12:27:04 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
\r
69 > > It is very convenient when C-e (bound to `widget-end-of-line') ignores
\r
70 > > trailing spaces inside the search widget. But it only does so if a
\r
71 > > widget is not followed by a newline (that is why it works in the saved
\r
72 > > search widgets). The patch just adds an insisible space after the
\r
73 > > search widget to get the desirable behavior of `widget-end-of-line'.
\r
75 > > Previous behavior of C-e:
\r
77 > > Search: [text _]
\r
81 > > Search: [text_ ]
\r
83 > > The extra space is also added to expected results of emacs tests.
\r
86 > > Amended version with a better commit message. Stolen from a similar
\r
87 > > patch by Kan-Ru Chen [1] as suggested by Pieter Praet :)
\r
94 > > [1] id:"1280195325-9066-2-git-send-email-kanru@kanru.info"
\r
96 > > emacs/notmuch-hello.el | 4 ++++
\r
97 > > test/emacs.expected-output/notmuch-hello | 2 +-
\r
98 > > .../notmuch-hello-no-saved-searches | 2 +-
\r
99 > > .../emacs.expected-output/notmuch-hello-with-empty | 2 +-
\r
100 > > 4 files changed, 7 insertions(+), 3 deletions(-)
\r
102 > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
103 > > index 65fde75..1a76c30 100644
\r
104 > > --- a/emacs/notmuch-hello.el
\r
105 > > +++ b/emacs/notmuch-hello.el
\r
106 > > @@ -462,6 +462,10 @@ Complete list of currently available key bindings:
\r
107 > > (length "Search: ")))
\r
108 > > :action (lambda (widget &rest ignore)
\r
109 > > (notmuch-hello-search (widget-value widget))))
\r
110 > > + ;; add an invisible space to make `widget-end-of-line' ignore
\r
111 > > + ;; trailine spaces in the search widget field
\r
112 > > + (widget-insert " ")
\r
113 > > + (put-text-property (1- (point)) (point) 'invisible t)
\r
114 > > (widget-insert "\n")
\r
116 > > (when notmuch-hello-recent-searches
\r
117 > > diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello
\r
118 > > index 64b7e42..48143bd 100644
\r
119 > > --- a/test/emacs.expected-output/notmuch-hello
\r
120 > > +++ b/test/emacs.expected-output/notmuch-hello
\r
121 > > @@ -4,7 +4,7 @@ Saved searches: [edit]
\r
123 > > 50 inbox 50 unread
\r
128 > > [Show all tags]
\r
130 > > diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
131 > > index 7f8206a..7c09e40 100644
\r
132 > > --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
133 > > +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
134 > > @@ -1,6 +1,6 @@
\r
135 > > Welcome to notmuch. You have 50 messages.
\r
140 > > [Show all tags]
\r
142 > > diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty
\r
143 > > index a9ed630..2a267c9 100644
\r
144 > > --- a/test/emacs.expected-output/notmuch-hello-with-empty
\r
145 > > +++ b/test/emacs.expected-output/notmuch-hello-with-empty
\r
146 > > @@ -4,7 +4,7 @@ Saved searches: [edit]
\r
148 > > 50 inbox 50 unread 0 empty
\r
153 > > [Show all tags]
\r
158 > > _______________________________________________
\r
159 > > notmuch mailing list
\r
160 > > notmuch@notmuchmail.org
\r
161 > > http://notmuchmail.org/mailman/listinfo/notmuch
\r
163 > Signed-off-by: Pieter Praet <pieter@praet.org>
\r
166 > Would this be the right place to promote two of your previous patches [1,2] ?
\r
168 > They serve as ears when using eye protection against `show-trailing-whitespace'.
\r
171 I am glad somebody uses it except for me :) I use them exactly for the
\r
174 They are not ready for mainline. Two issues:
\r
176 * Poor commit message should be improved to make Carl happy.
\r
178 * I have wrote them long ago, and I am not sure it is a proper
\r
179 implementation. I need to double check that before asking Carl to
\r
180 push it. Or somebody else with a better elisp knowledge should review
\r
183 I have been delaying this for some time. Since now I know somebody
\r
184 actually uses it, I may get to it sooner rather than later. But no
\r
187 BTW I am not really sure that hooks are the best solution for turning
\r
188 off `show-trailing-whitespace'. Perhaps there is a better way? Would
\r
189 appreciate comments. (Though, hooks would be useful anyway.)
\r
200 > [1] id:"1278000507-22290-5-git-send-email-dmitry.kurochkin@gmail.com"
\r
201 > [2] id:"1278000507-22290-6-git-send-email-dmitry.kurochkin@gmail.com"
\r