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 CB016431FBC for ; Thu, 8 Mar 2012 23:36:27 -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 hzpoRtlagdTV for ; Thu, 8 Mar 2012 23:36:27 -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 233B3431FAE for ; Thu, 8 Mar 2012 23:36:26 -0800 (PST) Received: by mail-bk0-f53.google.com with SMTP id j4so1103545bkw.26 for ; Thu, 08 Mar 2012 23:36:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=+RQYjmMnB/9+q0O5IZ7OOca/RVo5yq/l1IAdZedn7oU=; b=ovuggsm2lRa3BKU5UdcKDB9CK268Q7H5nKIlRkCLTFb5InhE37fbz7X103+23les2M 0GUOSobfAo9c6FNa9pWm8dm5/y1RP3QpNYURG6cZyjeLnTM5Gz9VZAV4e4FK3zk/C3jy zYenm3hDW0pWHGtAybp3IFONzaB4TCsr3uIPDdGtcmqi1flfQFCHSPqrtYHuwl1KIJQw HD/ryBHIz7Nnb9VhhQR6wqvYNcVmfK87DcmFISR7/Yuyz5RMSl/r5mBuVMm4j9HVJXmG K/nEBJF02HhwZwe8ehHgewZxJ+Gz6C5kO3yQwa09uxcdi77N9jkz2QzuHs/AyBWmWLHr PzkQ== Received: by 10.204.130.76 with SMTP id r12mr454490bks.80.1331278586775; Thu, 08 Mar 2012 23:36:26 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id jc4sm7572092bkc.7.2012.03.08.23.36.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Mar 2012 23:36:26 -0800 (PST) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: fix off-by-one error in notmuch-hello column alignment Date: Fri, 9 Mar 2012 11:34:53 +0400 Message-Id: <1331278493-16996-2-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1331278493-16996-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1331278493-16996-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: Fri, 09 Mar 2012 07:36:27 -0000 Expected results for few tests are fixed, the relevant test is unmarked broken. --- emacs/notmuch-hello.el | 2 +- test/emacs-hello | 1 - .../notmuch-hello-new-section | 2 +- .../notmuch-hello-section-with-empty | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index e9caade..28f39f1 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -461,7 +461,7 @@ Such a list can be computed with `notmuch-hello-query-counts'." ;; just insert `(- widest (length name))' spaces - the ;; column separator is included in the button if ;; `(equal widest (length name)'. - (widget-insert (make-string (max 1 + (widget-insert (make-string (max 0 (- widest (length name))) ? ))))) (setq count (1+ count)) diff --git a/test/emacs-hello b/test/emacs-hello index 9e5d045..be66ba4 100755 --- a/test/emacs-hello +++ b/test/emacs-hello @@ -45,7 +45,6 @@ test_emacs "(let ((notmuch-hello-sections test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts test_begin_subtest "Column alignment for tag/queries with long names" -test_subtest_known_broken tag=a-very-long-tag # length carefully calculated for 80 characters window width notmuch tag +$tag '*' test_emacs '(notmuch-hello) diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section index c64d712..6a339aa 100644 --- a/test/emacs.expected-output/notmuch-hello-new-section +++ b/test/emacs.expected-output/notmuch-hello-new-section @@ -1,4 +1,4 @@ Test: [hide] - 52 inbox + 52 inbox diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty index 8209fed..dc2568d 100644 --- a/test/emacs.expected-output/notmuch-hello-section-with-empty +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty @@ -1,4 +1,4 @@ Test-with-empty: [hide] - 52 inbox + 52 inbox -- 1.7.9.1