Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D5FD9431FAF for ; Wed, 18 Jan 2012 05:51:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v24q-bMKcu6E for ; Wed, 18 Jan 2012 05:51:12 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4B1B1431FAE for ; Wed, 18 Jan 2012 05:51:12 -0800 (PST) Received: by wibhr12 with SMTP id hr12so4428456wib.26 for ; Wed, 18 Jan 2012 05:51:11 -0800 (PST) Received: by 10.180.94.102 with SMTP id db6mr36556814wib.0.1326894671176; Wed, 18 Jan 2012 05:51:11 -0800 (PST) Received: from localhost ([109.131.97.13]) by mx.google.com with ESMTPS id q7sm22567271wix.5.2012.01.18.05.51.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jan 2012 05:51:10 -0800 (PST) From: Pieter Praet To: Dmitry Kurochkin , notmuch@notmuchmail.org Subject: Re: [PATCH v2] emacs: add invisible dot instead of space at the end of notmuch-hello search box In-Reply-To: <1326815734-20421-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1326806686-30642-1-git-send-email-dmitry.kurochkin@gmail.com> <1326815734-20421-1-git-send-email-dmitry.kurochkin@gmail.com> User-Agent: Notmuch/0.11+86~g67f4140 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Wed, 18 Jan 2012 14:49:27 +0100 Message-ID: <87mx9lp1co.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2012 13:51:13 -0000 On Tue, 17 Jan 2012 19:55:34 +0400, Dmitry Kurochkin wrote: > This makes `show-trailing-whitespace' happy, i.e. it does not mark the > whole search box line as trailing spaces. > > Since the dot is invisible, this change makes no visible difference > for `notmuch-hello'. > --- > emacs/notmuch-hello.el | 9 ++++++--- > 1 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el > index 02017ce..38846ef 100644 > --- a/emacs/notmuch-hello.el > +++ b/emacs/notmuch-hello.el > @@ -508,9 +508,12 @@ Complete list of currently available key bindings: > (length "Search: "))) > :action (lambda (widget &rest ignore) > (notmuch-hello-search (widget-value widget)))) > - ;; add an invisible space to make `widget-end-of-line' ignore > - ;; trailine spaces in the search widget field > - (widget-insert " ") > + ;; Add an invisible dot to make `widget-end-of-line' ignore > + ;; trailing spaces in the search widget field. A dot is used > + ;; instead of a space to make `show-trailing-whitespace' > + ;; happy, i.e. avoid it marking the whole line as trailing > + ;; spaces. > + (widget-insert ".") > (put-text-property (1- (point)) (point) 'invisible t) > (widget-insert "\n") > > -- > 1.7.8.3 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch +1 Peace -- Pieter