From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2D3EF429E5F for ; Tue, 17 Jan 2012 07:56:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 5PUNg2CrwrZo for ; Tue, 17 Jan 2012 07:56:31 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8CC9D429E3B for ; Tue, 17 Jan 2012 07:56:31 -0800 (PST) Received: by bkty12 with SMTP id y12so681386bkt.26 for ; Tue, 17 Jan 2012 07:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=ii0Yyc+gPmlm6MUgpMopRNYoJYdQDmILLqvDBP3p/kg=; b=OtCh6JoTPkdN/gF9k7+Kq3kIbAbzZJhpH7jJE9a9HE1hM3BapckyxcNxr9CeKjx1cg NrAU/KNpf/tO36i7XPfJYYKk5wdWNg99hOC7okTZ8EFBC/KnxVShqCGiKT2LZIn9BfXJ MhxyRCuEEv09XDdd9a2ThK0HkKUh63ap7GD7w= Received: by 10.205.127.132 with SMTP id ha4mr5841883bkc.35.1326815790253; Tue, 17 Jan 2012 07:56:30 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id iu2sm48106864bkb.0.2012.01.17.07.56.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jan 2012 07:56:29 -0800 (PST) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH v2] emacs: add invisible dot instead of space at the end of notmuch-hello search box Date: Tue, 17 Jan 2012 19:55:34 +0400 Message-Id: <1326815734-20421-1-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1326806686-30642-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1326806686-30642-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Tue, 17 Jan 2012 15:56:32 -0000 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