From d2605b7a5985d52c5a568a39ebafd127b549c363 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 23 Aug 2013 21:25:45 +0100 Subject: [PATCH] Re: [DRAFT PATCH] emacs: describe-prefix-bindings... --- 94/757854527ccce1f48ba4f276ffe0483d543c54 | 136 ++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 94/757854527ccce1f48ba4f276ffe0483d543c54 diff --git a/94/757854527ccce1f48ba4f276ffe0483d543c54 b/94/757854527ccce1f48ba4f276ffe0483d543c54 new file mode 100644 index 000000000..62f3459e5 --- /dev/null +++ b/94/757854527ccce1f48ba4f276ffe0483d543c54 @@ -0,0 +1,136 @@ +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 4079B431FD5 + for ; Fri, 23 Aug 2013 13:26:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 ug5PzjeLmofB for ; + Fri, 23 Aug 2013 13:25:55 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 299A3431FCF + for ; Fri, 23 Aug 2013 13:25:55 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1VCxvX-00038E-8t; Fri, 23 Aug 2013 21:25:49 +0100 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1VCxvW-0002Gi-Th; Fri, 23 Aug 2013 21:25:47 +0100 +From: Mark Walters +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [DRAFT PATCH] emacs: describe-prefix-bindings... +In-Reply-To: <1377275783-16948-1-git-send-email-tomi.ollila@iki.fi> +References: <1377275783-16948-1-git-send-email-tomi.ollila@iki.fi> +User-Agent: Notmuch/0.15.2+192~g8222af3 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Fri, 23 Aug 2013 21:25:45 +0100 +Message-ID: <871u5k17ee.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 6cdbcc1c2790d39c99ff03e407a3a52a (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: tomi.ollila@iki.fi +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, 23 Aug 2013 20:26:01 -0000 + + +Yes this is nice. Particularly for less common things like "open with" +for attachments and some of the stash commands. + +A notmuch--describe-prefix-bindings would make it even nicer. + +But I think the current version is enough of an improvement it could go +in without much change: as a first step a "stub" +notmuch--describe-prefix-bindings just doing describe-prefix-bindings +(but with a docstring :-) would be fine. + +Best wishes + +Mark + + + +On Fri, 23 Aug 2013, Tomi Ollila wrote: +> --- +> +> I plan to do `notmuch--describe-prefix-bindings' if there is support +> for this functionality (or no better solution exists -- I recall +> there is specific C functionality doing C-h handling...) +> +> +> emacs/notmuch-show.el | 2 ++ +> emacs/notmuch.el | 1 + +> 2 files changed, 3 insertions(+) +> +> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> index 82b70ba..6fd1f73 100644 +> --- a/emacs/notmuch-show.el +> +++ b/emacs/notmuch-show.el +> @@ -1248,6 +1248,7 @@ reset based on the original query." +> (define-key map "t" 'notmuch-show-stash-to) +> (define-key map "l" 'notmuch-show-stash-mlarchive-link) +> (define-key map "L" 'notmuch-show-stash-mlarchive-link-and-go) +> + (define-key map "?" (lambda () (interactive) (describe-prefix-bindings))) +> map) +> "Submap for stash commands") +> (fset 'notmuch-show-stash-map notmuch-show-stash-map) +> @@ -1258,6 +1259,7 @@ reset based on the original query." +> (define-key map "v" 'notmuch-show-view-part) +> (define-key map "o" 'notmuch-show-interactively-view-part) +> (define-key map "|" 'notmuch-show-pipe-part) +> + (define-key map "?" (lambda () (interactive) (describe-prefix-bindings))) +> map) +> "Submap for part commands") +> (fset 'notmuch-show-part-map notmuch-show-part-map) +> diff --git a/emacs/notmuch.el b/emacs/notmuch.el +> index f3ce840..ac6a712 100644 +> --- a/emacs/notmuch.el +> +++ b/emacs/notmuch.el +> @@ -245,6 +245,7 @@ For a mouse binding, return nil." +> (defvar notmuch-search-stash-map +> (let ((map (make-sparse-keymap))) +> (define-key map "i" 'notmuch-search-stash-thread-id) +> + (define-key map "?" (lambda () (interactive) (describe-prefix-bindings))) +> map) +> "Submap for stash commands") +> (fset 'notmuch-search-stash-map notmuch-search-stash-map) +> -- +> 1.8.0 +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2