--- /dev/null
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 5C598431FD0\r
+ for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 02:08:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.7\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.7 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 3zHYdtFETtNB for <notmuch@notmuchmail.org>;\r
+ Mon, 4 Jul 2011 02:08:52 -0700 (PDT)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+ [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 207A0431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 02:08:51 -0700 (PDT)\r
+Received: by bwg12 with SMTP id 12so4604172bwg.26\r
+ for <notmuch@notmuchmail.org>; Mon, 04 Jul 2011 02:08:50 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version:content-type;\r
+ bh=rfe4SVPNHL4Px8u6zzVVTjULj1IHHe+cGwHTsThcR/E=;\r
+ b=GNjSjvI9hhT+xfGmf4G4eKgVzUN5e1WckAgd0Xq10/HwzZyfisNZdXoDQGI79J+92V\r
+ BKvYdVzMc9kKU8xrIRRmVWSZp3hA+vnu0k5MWQC2L/wrRCuc4wsSyVdZjeBAcp1eKXT4\r
+ c4lSx9ENb4OCu9YjtsHvmi0bcOv1YndOAhb7A=\r
+Received: by 10.204.42.18 with SMTP id q18mr2963bke.46.1309770530680;\r
+ Mon, 04 Jul 2011 02:08:50 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+ by mx.google.com with ESMTPS id k16sm5372009bks.13.2011.07.04.02.08.48\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Mon, 04 Jul 2011 02:08:49 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Pieter Praet <pieter@praet.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2] emacs: add insisible space after the search widget\r
+ field in notmuch-hello\r
+In-Reply-To: <8762nifmrq.fsf@praet.org>\r
+References: <id:1309762025-1172-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+ <1309768024-14584-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+ <8762nifmrq.fsf@praet.org>\r
+User-Agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 04 Jul 2011 13:08:43 +0400\r
+Message-ID: <87r56676qs.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 04 Jul 2011 09:08:53 -0000\r
+\r
+On Mon, 04 Jul 2011 10:55:21 +0200, Pieter Praet <pieter@praet.org> wrote:\r
+> On Mon, 4 Jul 2011 12:27:04 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
+> > It is very convenient when C-e (bound to `widget-end-of-line') ignores\r
+> > trailing spaces inside the search widget. But it only does so if a\r
+> > widget is not followed by a newline (that is why it works in the saved\r
+> > search widgets). The patch just adds an insisible space after the\r
+> > search widget to get the desirable behavior of `widget-end-of-line'.\r
+> > \r
+> > Previous behavior of C-e:\r
+> > \r
+> > Search: [text _]\r
+> > \r
+> > Now:\r
+> > \r
+> > Search: [text_ ]\r
+> > \r
+> > The extra space is also added to expected results of emacs tests.\r
+> > ---\r
+> > \r
+> > Amended version with a better commit message. Stolen from a similar\r
+> > patch by Kan-Ru Chen [1] as suggested by Pieter Praet :)\r
+> \r
+> Muhahaaa!\r
+> \r
+> > Regards,\r
+> > Dmitry\r
+> > \r
+> > [1] id:"1280195325-9066-2-git-send-email-kanru@kanru.info"\r
+> > \r
+> > emacs/notmuch-hello.el | 4 ++++\r
+> > test/emacs.expected-output/notmuch-hello | 2 +-\r
+> > .../notmuch-hello-no-saved-searches | 2 +-\r
+> > .../emacs.expected-output/notmuch-hello-with-empty | 2 +-\r
+> > 4 files changed, 7 insertions(+), 3 deletions(-)\r
+> > \r
+> > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+> > index 65fde75..1a76c30 100644\r
+> > --- a/emacs/notmuch-hello.el\r
+> > +++ b/emacs/notmuch-hello.el\r
+> > @@ -462,6 +462,10 @@ Complete list of currently available key bindings:\r
+> > (length "Search: ")))\r
+> > :action (lambda (widget &rest ignore)\r
+> > (notmuch-hello-search (widget-value widget))))\r
+> > + ;; add an invisible space to make `widget-end-of-line' ignore\r
+> > + ;; trailine spaces in the search widget field\r
+> > + (widget-insert " ")\r
+> > + (put-text-property (1- (point)) (point) 'invisible t)\r
+> > (widget-insert "\n")\r
+> > \r
+> > (when notmuch-hello-recent-searches\r
+> > diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello\r
+> > index 64b7e42..48143bd 100644\r
+> > --- a/test/emacs.expected-output/notmuch-hello\r
+> > +++ b/test/emacs.expected-output/notmuch-hello\r
+> > @@ -4,7 +4,7 @@ Saved searches: [edit]\r
+> > \r
+> > 50 inbox 50 unread \r
+> > \r
+> > -Search: \r
+> > +Search: \r
+> > \r
+> > [Show all tags]\r
+> > \r
+> > diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
+> > index 7f8206a..7c09e40 100644\r
+> > --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
+> > +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
+> > @@ -1,6 +1,6 @@\r
+> > Welcome to notmuch. You have 50 messages.\r
+> > \r
+> > -Search: \r
+> > +Search: \r
+> > \r
+> > [Show all tags]\r
+> > \r
+> > diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty\r
+> > index a9ed630..2a267c9 100644\r
+> > --- a/test/emacs.expected-output/notmuch-hello-with-empty\r
+> > +++ b/test/emacs.expected-output/notmuch-hello-with-empty\r
+> > @@ -4,7 +4,7 @@ Saved searches: [edit]\r
+> > \r
+> > 50 inbox 50 unread 0 empty \r
+> > \r
+> > -Search: \r
+> > +Search: \r
+> > \r
+> > [Show all tags]\r
+> > \r
+> > -- \r
+> > 1.7.5.4\r
+> > \r
+> > _______________________________________________\r
+> > notmuch mailing list\r
+> > notmuch@notmuchmail.org\r
+> > http://notmuchmail.org/mailman/listinfo/notmuch\r
+> \r
+> Signed-off-by: Pieter Praet <pieter@praet.org>\r
+> \r
+> \r
+> Would this be the right place to promote two of your previous patches [1,2] ?\r
+> \r
+> They serve as ears when using eye protection against `show-trailing-whitespace'.\r
+> \r
+\r
+I am glad somebody uses it except for me :) I use them exactly for the\r
+same reason.\r
+\r
+They are not ready for mainline. Two issues:\r
+\r
+* Poor commit message should be improved to make Carl happy.\r
+\r
+* I have wrote them long ago, and I am not sure it is a proper\r
+ implementation. I need to double check that before asking Carl to\r
+ push it. Or somebody else with a better elisp knowledge should review\r
+ and approve it.\r
+\r
+I have been delaying this for some time. Since now I know somebody\r
+actually uses it, I may get to it sooner rather than later. But no\r
+promises.\r
+\r
+BTW I am not really sure that hooks are the best solution for turning\r
+off `show-trailing-whitespace'. Perhaps there is a better way? Would\r
+appreciate comments. (Though, hooks would be useful anyway.)\r
+\r
+Regards,\r
+ Dmitry\r
+\r
+> \r
+> Peace\r
+> \r
+> -- \r
+> Pieter\r
+> \r
+> [1] id:"1278000507-22290-5-git-send-email-dmitry.kurochkin@gmail.com"\r
+> [2] id:"1278000507-22290-6-git-send-email-dmitry.kurochkin@gmail.com"\r