From 784f989fcfc2061b1ebba948d4f76c0f54b5abc5 Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Wed, 22 Feb 2012 19:43:30 +0100 Subject: [PATCH] [PATCH v2 3/7] emacs: rename `notmuch-show-toggle-headers' to `notmuch-show-toggle-visibility-headers' --- 24/25c967198ed145b14cc7f5caf3db25e6badd52 | 162 ++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 24/25c967198ed145b14cc7f5caf3db25e6badd52 diff --git a/24/25c967198ed145b14cc7f5caf3db25e6badd52 b/24/25c967198ed145b14cc7f5caf3db25e6badd52 new file mode 100644 index 000000000..4e13ca646 --- /dev/null +++ b/24/25c967198ed145b14cc7f5caf3db25e6badd52 @@ -0,0 +1,162 @@ +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 00773431FC3 + for ; Wed, 22 Feb 2012 10:45:58 -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 9wI8j5gdtlv0 for ; + Wed, 22 Feb 2012 10:45:57 -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 933C4431FBD + for ; Wed, 22 Feb 2012 10:45:56 -0800 (PST) +Received: by wibhi8 with SMTP id hi8so270670wib.26 + for ; Wed, 22 Feb 2012 10:45:55 -0800 (PST) +Received-SPF: pass (google.com: domain of pieter@praet.org designates + 10.216.135.66 as permitted sender) client-ip=10.216.135.66; +Authentication-Results: mr.google.com; + spf=pass (google.com: domain of pieter@praet.org + designates 10.216.135.66 as permitted sender) + smtp.mail=pieter@praet.org +Received: from mr.google.com ([10.216.135.66]) + by 10.216.135.66 with SMTP id t44mr9685524wei.52.1329936355506 + (num_hops = 1); Wed, 22 Feb 2012 10:45:55 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=gamma; + h=mime-version:from:to:subject:date:message-id:x-mailer:in-reply-to + :references:x-gm-message-state; + bh=w2iLCeFp1vWpqgiVlgptFyJpyKu1Em+uaIGTOsYozPI=; + b=w6vOfa0RZUpGYEMB5R1vwtaZswoo0h3EnmjRVYKBAbUVCO/zQHpLf7GlPN/QfF6oP2 + Ud5HEQ7mDUiWddbddmjsoqUQObEQpVYvwT4GmQslqXSWYHaOsL4vfv8tiubdFBl6zU57 + 0olF5jvMIbKl0tCMZvLRVN/N1/nPFt+4N1NfY= +MIME-Version: 1.0 +Received: by 10.216.135.66 with SMTP id t44mr8033467wei.52.1329936355371; + Wed, 22 Feb 2012 10:45:55 -0800 (PST) +Received: from localhost ([109.131.181.26]) + by mx.google.com with ESMTPS id s2sm74866974wix.3.2012.02.22.10.45.54 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 22 Feb 2012 10:45:55 -0800 (PST) +From: Pieter Praet +To: Notmuch Mail +Subject: [PATCH v2 3/7] emacs: rename `notmuch-show-toggle-headers' to + `notmuch-show-toggle-visibility-headers' +Date: Wed, 22 Feb 2012 19:43:30 +0100 +Message-Id: <1329936214-30959-3-git-send-email-pieter@praet.org> +X-Mailer: git-send-email 1.7.8.1 +In-Reply-To: <1327469139-1968-1-git-send-email-pieter@praet.org> +References: <1327469139-1968-1-git-send-email-pieter@praet.org> +X-Gm-Message-State: + ALoCoQm1ZG4cfqBbuyuxj0sxnLVWckQ3Ro1FJrvuYYJAa7MaNCcethKiGaGmcAo+/JUZXNz9/gck +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, 22 Feb 2012 18:45:58 -0000 + +* emacs/notmuch-show.el + + (notmuch-show-toggle-headers): + Rename to `notmuch-show-toggle-visibility-headers'. + + (notmuch-show-mode-map): + Update "h" binding wrt renamed `notmuch-show-toggle-headers'. + + (notmuch-message-headers): + Update docstring wrt renamed `notmuch-show-toggle-headers'. + + (notmuch-message-headers-visible): + Update docstring wrt renamed `notmuch-show-toggle-headers'. + Also fixed a small typo. + +* test/emacs: + + Update subtest wrt renamed `notmuch-show-toggle-headers': + - "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)" +--- + emacs/notmuch-show.el | 12 ++++++------ + test/emacs | 4 ++-- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index aa9ccee..861018d 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -48,8 +48,8 @@ (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") + + For an open message, all of these headers will be made visible + according to `notmuch-message-headers-visible' or can be toggled +-with `notmuch-show-toggle-headers'. For a closed message, only +-the first header in the list will be visible." ++with `notmuch-show-toggle-visibility-headers'. For a closed message, ++only the first header in the list will be visible." + :type '(repeat string) + :group 'notmuch-show) + +@@ -59,8 +59,8 @@ (defcustom notmuch-message-headers-visible t + If this value is non-nil, then all of the headers defined in + `notmuch-message-headers' will be visible by default in the display + of each message. Otherwise, these headers will be hidden and +-`notmuch-show-toggle-headers' can be used to make the visible for +-any given message." ++`notmuch-show-toggle-visibility-headers' can be used to make them ++visible for any given message." + :type 'boolean + :group 'notmuch-show) + +@@ -1168,7 +1168,7 @@ (defvar notmuch-show-mode-map + (define-key map "v" 'notmuch-show-view-all-mime-parts) + (define-key map "c" 'notmuch-show-stash-map) + (define-key map "=" 'notmuch-show-refresh-view) +- (define-key map "h" 'notmuch-show-toggle-headers) ++ (define-key map "h" 'notmuch-show-toggle-visibility-headers) + (define-key map "*" 'notmuch-show-tag-all) + (define-key map "-" 'notmuch-show-remove-tag) + (define-key map "+" 'notmuch-show-add-tag) +@@ -1650,7 +1650,7 @@ (defun notmuch-show-remove-tag () + (interactive) + (notmuch-show-tag "-")) + +-(defun notmuch-show-toggle-headers () ++(defun notmuch-show-toggle-visibility-headers () + "Toggle the visibility of the current message headers." + (interactive) + (let ((props (notmuch-show-get-message-properties))) +diff --git a/test/emacs b/test/emacs +index 7d6e6ee..f17efbd 100755 +--- a/test/emacs ++++ b/test/emacs +@@ -399,12 +399,12 @@ test_emacs \ + (test-visible-output))' + test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden + +-test_begin_subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)" ++test_begin_subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-visibility-headers)" + test_emacs \ + '(let ((notmuch-message-headers '\''("Subject" "To" "Cc" "Date")) + (notmuch-message-headers-visible t)) + (notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") +- (notmuch-show-toggle-headers) ++ (notmuch-show-toggle-visibility-headers) + (test-visible-output))' + test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden + +-- +1.7.8.1 + -- 2.26.2