From a6d8c99a798a7de1af67da5dc2f5925cfe81d2e3 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 13 Mar 2016 14:27:17 +0200 Subject: [PATCH] [PATCH] emacs: hello: promote '?' as the universal help key --- 86/88fd5c5ffb53a11d68d6536f893a2e87fb75d1 | 221 ++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 86/88fd5c5ffb53a11d68d6536f893a2e87fb75d1 diff --git a/86/88fd5c5ffb53a11d68d6536f893a2e87fb75d1 b/86/88fd5c5ffb53a11d68d6536f893a2e87fb75d1 new file mode 100644 index 000000000..8a7178f33 --- /dev/null +++ b/86/88fd5c5ffb53a11d68d6536f893a2e87fb75d1 @@ -0,0 +1,221 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 4A2A86DE1873 + for ; Sun, 13 Mar 2016 05:28:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.555 +X-Spam-Level: +X-Spam-Status: No, score=-0.555 tagged_above=-999 required=5 tests=[AWL=0.165, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, + RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id dfQQ3-zHvxA8 for ; + Sun, 13 Mar 2016 05:28:24 -0700 (PDT) +Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com + [74.125.82.45]) by arlo.cworth.org (Postfix) with ESMTPS id 6F4846DE187C for + ; Sun, 13 Mar 2016 05:28:23 -0700 (PDT) +Received: by mail-wm0-f45.google.com with SMTP id l68so70053707wml.1 + for ; Sun, 13 Mar 2016 05:28:23 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=nikula-org.20150623.gappssmtp.com; s=20150623; + h=from:to:cc:subject:date:message-id; + bh=ZYGQ+JBynnF3eb5dNICUJ/h0wa4jWcmHy7b1nqxJo8s=; + b=MsXeBcEuFddHLSsDzVD0ZRYYhbf9bnWrW1UFk8lSuTgwydDjJNjilFuWvF2uRLS3xM + 7MrOKP7INWNG5r2z+MtzSdtTfZ7ftpz+Hx50bRvxVbM82xGNSQUC4d8yRKttg/YXMQcu + 3DDCJ0BSLYD905uE875J30gPTY2YAu8t1dasb8OylKT7PXC6L7Exrx4wg2JrxKwvINwY + g/1qyDhdQOOWp/SsS34j4EGy1B+ELH3Gh4PUpv6kgU3GIDozd0NTle7/Z4FYLDLw5rzh + L2TkmZl55VSAs4hgpo+mr7AENksNjZCJk2xXMfKK7ty2DQ0QsmalDQoCkGeICCveYT9z + luzg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id; + bh=ZYGQ+JBynnF3eb5dNICUJ/h0wa4jWcmHy7b1nqxJo8s=; + b=CRMXr8j7SCAcnYuyg+fxb78ob8mfjSliDRnzjrTksqsHTcwwyKQfBfPH2UnQs6ci80 + apHsla3bvBW/aHq16SD2+nT4o2JL+nlevzm10LBWRSITa+PLJETsraPU7dAo4dCBaQP2 + +IxJdgFsfYK4vgtytXEHvIcQ41QDfSCorGKQKHPYuq7trkuabrzyFtXZzEl3zDwGeImT + yTwOS9lpTr48/lafh+JkiK1dHCZ9Hz1dgjL0OaY0J3U62qL1KkcoEdNRL1v42cpEIRuG + +o8qd7t5Pf7bBpDsGv/FpJocc1mSKb9aqGk/g13phzuNeYL0ydC5e7OCcyhZGcHJLkxq + cx9w== +X-Gm-Message-State: + AD7BkJKcBh1FfO+fA1NjThvm70L1M+DBRTwNFM73qQaNFv/J/xUzgfZ5ZG2w9MyyaGadvw== +X-Received: by 10.194.201.166 with SMTP id kb6mr19346400wjc.125.1457872100589; + Sun, 13 Mar 2016 05:28:20 -0700 (PDT) +Received: from localhost (mobile-access-bcee39-255.dhcp.inet.fi. + [188.238.57.255]) + by smtp.gmail.com with ESMTPSA id 8sm11401671wmk.13.2016.03.13.05.28.19 + (version=TLSv1/SSLv3 cipher=OTHER); + Sun, 13 Mar 2016 05:28:19 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: hello: promote '?' as the universal help key +Date: Sun, 13 Mar 2016 14:27:17 +0200 +Message-Id: <1457872037-22561-1-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 2.1.4 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sun, 13 Mar 2016 12:28:27 -0000 + +Move the brief help text at the bottom of the hello screen to the +notmuch-hello-mode help, and promote '?' as the universal help key +across Notmuch. This unclutters the hello screen, and allows for a +more verbose description in the mode help. Hopefully, this change is +useful for both experienced and new users alike. + +While at it, improve the links to Notmuch and hello screen +customization. + +--- + +This obsoletes +id:1450026221-23286-1-git-send-email-jani@nikula.org +--- + emacs/notmuch-hello.el | 44 +++++++++++++++++----- + test/emacs.expected-output/notmuch-hello | 7 +--- + .../emacs.expected-output/notmuch-hello-long-names | 7 +--- + .../notmuch-hello-no-saved-searches | 7 +--- + .../emacs.expected-output/notmuch-hello-with-empty | 7 +--- + 5 files changed, 42 insertions(+), 30 deletions(-) + +diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el +index b42e0f24148a..8a31f9a1c52c 100644 +--- a/emacs/notmuch-hello.el ++++ b/emacs/notmuch-hello.el +@@ -672,6 +672,31 @@ with `notmuch-hello-query-counts'." + (defun notmuch-hello-mode () + "Major mode for convenient notmuch navigation. This is your entry portal into notmuch. + ++Saved searches are \"bookmarks\" for arbitrary queries. Hit RET ++or click on a saved search to view matching threads. Edit saved ++searches with the `edit' button. Type `\\[notmuch-jump-search]' ++in any Notmuch screen for quick access to saved searches that ++have shortcut keys. ++ ++Type new searches in the search box and hit RET to view matching ++threads. Hit RET in a recent search box to re-submit a previous ++search. Edit it first if you like. Save a recent search to saved ++searches with the `save' button. ++ ++Hit `\\[notmuch-search]' or `\\[notmuch-tree]' in any Notmuch ++screen to search for messages and view matching threads or ++messages, respectively. Recent searches are available in the ++minibuffer history. ++ ++Expand the all tags view with the `show' button (and collapse ++again with the `hide' button). Hit RET or click on a tag name to ++view matching threads. ++ ++Hit `\\[notmuch-refresh-this-buffer]' to refresh the screen and ++`\\[notmuch-bury-or-kill-this-buffer]' to quit. ++ ++The screen may be customized via `\\[customize]'. ++ + Complete list of currently available key bindings: + + \\{notmuch-hello-mode-map}" +@@ -907,20 +932,19 @@ following: + (defun notmuch-hello-insert-footer () + "Insert the notmuch-hello footer." + (let ((start (point))) +- (widget-insert "Type a search query and hit RET to view matching threads.\n") +- (when notmuch-search-history +- (widget-insert "Hit RET to re-submit a previous search. Edit it first if you like.\n") +- (widget-insert "Save recent searches with the `save' button.\n")) +- (when notmuch-saved-searches +- (widget-insert "Edit saved searches with the `edit' button.\n")) +- (widget-insert "Hit RET or click on a saved search or tag name to view matching threads.\n") +- (widget-insert "`=' to refresh this screen. `s' to search messages. `q' to quit.\n") ++ (widget-insert "Hit `?' for context-sensitive help in any Notmuch screen.\n") ++ (widget-insert "Customize ") ++ (widget-create 'link ++ :notify (lambda (&rest ignore) ++ (customize-group 'notmuch)) ++ :button-prefix "" :button-suffix "" ++ "Notmuch") ++ (widget-insert " or ") + (widget-create 'link + :notify (lambda (&rest ignore) + (customize-variable 'notmuch-hello-sections)) + :button-prefix "" :button-suffix "" +- "Customize") +- (widget-insert " this page.") ++ "this page.") + (let ((fill-column (- (window-width) notmuch-hello-indent))) + (center-region start (point))))) + +diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello +index 9ba4cfc1d560..89186082f8a9 100644 +--- a/test/emacs.expected-output/notmuch-hello ++++ b/test/emacs.expected-output/notmuch-hello +@@ -8,8 +8,5 @@ Search: . + + All tags: [show] + +- Type a search query and hit RET to view matching threads. +- Edit saved searches with the `edit' button. +- Hit RET or click on a saved search or tag name to view matching threads. +- `=' to refresh this screen. `s' to search messages. `q' to quit. +- Customize this page. ++ Hit `?' for context-sensitive help in any Notmuch screen. ++ Customize Notmuch or this page. +diff --git a/test/emacs.expected-output/notmuch-hello-long-names b/test/emacs.expected-output/notmuch-hello-long-names +index 1c8d6eb624b9..da0f3525325d 100644 +--- a/test/emacs.expected-output/notmuch-hello-long-names ++++ b/test/emacs.expected-output/notmuch-hello-long-names +@@ -11,8 +11,5 @@ All tags: [hide] + 52 a-very-long-tag 52 inbox 52 unread + 4 attachment 7 signed + +- Type a search query and hit RET to view matching threads. +- Edit saved searches with the `edit' button. +- Hit RET or click on a saved search or tag name to view matching threads. +- `=' to refresh this screen. `s' to search messages. `q' to quit. +- Customize this page. ++ Hit `?' for context-sensitive help in any Notmuch screen. ++ Customize Notmuch or this page. +diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches +index 05475b15abee..939965fef154 100644 +--- a/test/emacs.expected-output/notmuch-hello-no-saved-searches ++++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches +@@ -4,8 +4,5 @@ Search: . + + All tags: [show] + +- Type a search query and hit RET to view matching threads. +- Edit saved searches with the `edit' button. +- Hit RET or click on a saved search or tag name to view matching threads. +- `=' to refresh this screen. `s' to search messages. `q' to quit. +- Customize this page. ++ Hit `?' for context-sensitive help in any Notmuch screen. ++ Customize Notmuch or this page. +diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty +index 854e0c2a22e8..97d7db26ebfa 100644 +--- a/test/emacs.expected-output/notmuch-hello-with-empty ++++ b/test/emacs.expected-output/notmuch-hello-with-empty +@@ -8,8 +8,5 @@ Search: . + + All tags: [show] + +- Type a search query and hit RET to view matching threads. +- Edit saved searches with the `edit' button. +- Hit RET or click on a saved search or tag name to view matching threads. +- `=' to refresh this screen. `s' to search messages. `q' to quit. +- Customize this page. ++ Hit `?' for context-sensitive help in any Notmuch screen. ++ Customize Notmuch or this page. +-- +2.1.4 + -- 2.26.2