--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id CEA15431FD7\r
+ for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 12:04:51 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id nbXHf+-nV7tB for <notmuch@notmuchmail.org>;\r
+ Mon, 26 Aug 2013 12:04:47 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 01338431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 12:04:46 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1VDXVC-000281-0T; Sun, 25 Aug 2013 11:25:01 +0100\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1VDXVB-00018j-M4; Sun, 25 Aug 2013 11:24:57 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/1] emacs: add '?' to some prefix keymaps to describe its\r
+ bindings\r
+In-Reply-To: <1377346540-7094-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1377346540-7094-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.15.2+269~g01f5508 (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sun, 25 Aug 2013 11:24:56 +0100\r
+Message-ID: <8761uu2hl3.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 5ea73a0ceb601597eb8dab528fbda68d (of first 20000 bytes)\r
+X-SpamAssassin-Score: 0.0\r
+X-SpamAssassin-SpamBar: /\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored 0.0 points. Summary of the scoring: \r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * 0.0 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 26 Aug 2013 19:04:51 -0000\r
+\r
+\r
+On Sat, 24 Aug 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> Added (private) function `notmuch--prefix-bindings' which wraps\r
+> `describe-prefix-bindings' to provide more suitable user interface for\r
+> showing the key sequences that follow a particular notmuch prefix\r
+> keymap invocation.\r
+>\r
+> The key '?' in prefix keymaps `notmuch-search-stash-map',\r
+> `notmuch-show-stash-map' and `notmuch-show-part-map' is bound to this\r
+> function via `lambda' expression. By using this lambda expression the\r
+> pop-up binding description window shows '??' instead of\r
+> `notmuch--prefix-bindings' for the binding of '?' -- which suits our\r
+> needs perfectly.\r
+\r
+This looks good to me +1. \r
+\r
+[I think I would prefer docstrings to function names but getting that\r
+does not seem to be easy so is probably not worth the effort.]\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+> ---\r
+> emacs/notmuch-lib.el | 9 +++++++++\r
+> emacs/notmuch-show.el | 2 ++\r
+> emacs/notmuch.el | 1 +\r
+> 3 files changed, 12 insertions(+)\r
+>\r
+> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+> index 4796f17..8191aec 100644\r
+> --- a/emacs/notmuch-lib.el\r
+> +++ b/emacs/notmuch-lib.el\r
+> @@ -553,6 +553,15 @@ status."\r
+> (message "%s" (error-message-string err))))\r
+> (ignore-errors (delete-file err-file))))\r
+> \r
+> +(defun notmuch--prefix-bindings ()\r
+> + "Notmuch private wrapper for `describe-prefix-bindings'."\r
+> + ;;(interactive)\r
+> + (describe-prefix-bindings)\r
+> + (pop-to-buffer "*Help*") ; XXX that's what describe-bindings-internal uses\r
+> + (let ((buffer-read-only nil))\r
+> + (goto-char (point-min))\r
+> + (insert "\nPress 'q' to quit this window.\n\n")))\r
+> +\r
+> ;; This variable is used only buffer local, but it needs to be\r
+> ;; declared globally first to avoid compiler warnings.\r
+> (defvar notmuch-show-process-crypto nil)\r
+> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+> index 82b70ba..98bf3d4 100644\r
+> --- a/emacs/notmuch-show.el\r
+> +++ b/emacs/notmuch-show.el\r
+> @@ -1248,6 +1248,7 @@ reset based on the original query."\r
+> (define-key map "t" 'notmuch-show-stash-to)\r
+> (define-key map "l" 'notmuch-show-stash-mlarchive-link)\r
+> (define-key map "L" 'notmuch-show-stash-mlarchive-link-and-go)\r
+> + (define-key map "?" (lambda () (interactive) (notmuch--prefix-bindings)))\r
+> map)\r
+> "Submap for stash commands")\r
+> (fset 'notmuch-show-stash-map notmuch-show-stash-map)\r
+> @@ -1258,6 +1259,7 @@ reset based on the original query."\r
+> (define-key map "v" 'notmuch-show-view-part)\r
+> (define-key map "o" 'notmuch-show-interactively-view-part)\r
+> (define-key map "|" 'notmuch-show-pipe-part)\r
+> + (define-key map "?" (lambda () (interactive) (notmuch--prefix-bindings)))\r
+> map)\r
+> "Submap for part commands")\r
+> (fset 'notmuch-show-part-map notmuch-show-part-map)\r
+> diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+> index f3ce840..3a115c8 100644\r
+> --- a/emacs/notmuch.el\r
+> +++ b/emacs/notmuch.el\r
+> @@ -245,6 +245,7 @@ For a mouse binding, return nil."\r
+> (defvar notmuch-search-stash-map\r
+> (let ((map (make-sparse-keymap)))\r
+> (define-key map "i" 'notmuch-search-stash-thread-id)\r
+> + (define-key map "?" (lambda () (interactive) (notmuch--prefix-bindings)))\r
+> map)\r
+> "Submap for stash commands")\r
+> (fset 'notmuch-search-stash-map notmuch-search-stash-map)\r
+> -- \r
+> 1.8.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r