1 Return-Path: <amdragon@mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 2776A431FCF
\r
6 for <notmuch@notmuchmail.org>; Thu, 7 Nov 2013 10:52:46 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id GPQ3eIbkzjIq for <notmuch@notmuchmail.org>;
\r
16 Thu, 7 Nov 2013 10:52:38 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 955E7431FBC
\r
22 for <notmuch@notmuchmail.org>; Thu, 7 Nov 2013 10:52:38 -0800 (PST)
\r
23 X-AuditID: 12074423-b7fac8e00000539e-64-527be174a691
\r
24 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
25 (using TLS with cipher AES256-SHA (256/256 bits))
\r
26 (Client did not present a certificate)
\r
27 by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP
\r
28 id 39.7A.21406.471EB725; Thu, 7 Nov 2013 13:52:36 -0500 (EST)
\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
30 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id rA7IqYAP011629;
\r
31 Thu, 7 Nov 2013 13:52:35 -0500
\r
32 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
33 (authenticated bits=0)
\r
34 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
35 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id rA7IqW0G019257
\r
36 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
\r
37 Thu, 7 Nov 2013 13:52:33 -0500
\r
38 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)
\r
39 (envelope-from <amdragon@mit.edu>)
\r
40 id 1VeUgy-0003wi-6I; Thu, 07 Nov 2013 13:52:32 -0500
\r
41 From: Austin Clements <amdragon@MIT.EDU>
\r
42 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH 1/4] emacs: help: check for nil key binding
\r
44 In-Reply-To: <1382821479-23384-2-git-send-email-markwalters1009@gmail.com>
\r
45 References: <1382821479-23384-1-git-send-email-markwalters1009@gmail.com>
\r
46 <1382821479-23384-2-git-send-email-markwalters1009@gmail.com>
\r
47 User-Agent: Notmuch/0.16+110~g45444ee (http://notmuchmail.org) Emacs/23.4.1
\r
49 Date: Thu, 07 Nov 2013 13:52:31 -0500
\r
50 Message-ID: <87k3gkkpsg.fsf@awakening.csail.mit.edu>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-Brightmail-Tracker:
\r
54 H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsUixCmqrVvysDrI4NxBEYvVc3ksrt+cyezA
\r
55 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZbybe4Ox4K5gxfEP31kaGB/wdjFyckgImEjM
\r
56 2buBDcIWk7hwbz2QzcUhJDCbSeLNiV3sEM4GRom3z2YyQTinmCReNNwDaxESWMIo8feUPYjN
\r
57 JqAhsW3/ckYQW0TAVeLpt8/MILawgL3ErW/zmUBsTgEviesfl0ANameUmH5zP1hCVCBeYuq3
\r
58 OewgNouAqsTb92/BBvEC3fdn+0N2CFtQ4uTMJywgNrOAlsSNfy+ZJjAKzEKSmoUktYCRaRWj
\r
59 bEpulW5uYmZOcWqybnFyYl5eapGumV5uZoleakrpJkZQSLK7KO9g/HNQ6RCjAAejEg/viUvV
\r
60 QUKsiWXFlbmHGCU5mJREeeUfAIX4kvJTKjMSizPii0pzUosPMUpwMCuJ8B5ZCJTjTUmsrEot
\r
61 yodJSXOwKInz3uKwDxISSE8sSc1OTS1ILYLJynBwKEnw6oAMFSxKTU+tSMvMKUFIM3Fwggzn
\r
62 ARruDFLDW1yQmFucmQ6RP8WoKCXOe/8+UEIAJJFRmgfXC0sZrxjFgV4R5vUEaecBphu47ldA
\r
63 g5mABof8qgQZXJKIkJJqYJyxaL+X9g3LLR6r42wFrhx3Xv7QUF8y+wxz5M66aqO/kXfaNi07
\r
64 Vd9vyvJ1Gsf8RyueaaVUPrPN+/Cj1YlB4nhWgtKu1ckbDN0fWZjtf/z0o6Hk5ZcPL3vd7vvo
\r
65 J6W38MDmvEOTyj3u/5vi/6C18blR42XvlVff7X6oHywflBh+XfqzdkH46iVKLMUZiYZazEXF
\r
67 X-BeenThere: notmuch@notmuchmail.org
\r
68 X-Mailman-Version: 2.1.13
\r
70 List-Id: "Use and development of the notmuch mail system."
\r
71 <notmuch.notmuchmail.org>
\r
72 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
73 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
75 List-Post: <mailto:notmuch@notmuchmail.org>
\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
77 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
78 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
79 X-List-Received-Date: Thu, 07 Nov 2013 18:52:46 -0000
\r
81 On Sat, 26 Oct 2013, Mark Walters <markwalters1009@gmail.com> wrote:
\r
82 > A standard way to unset a key binding is local-unset-key which is equivalent to
\r
83 > (define-key (current-local-map) key nil)
\r
84 > Currently notmuch-help gives an error and fails if a user has done this.
\r
86 > To fix this we check for a nil binding before adding a help line.
\r
88 > emacs/notmuch.el | 25 +++++++++++++------------
\r
89 > 1 files changed, 13 insertions(+), 12 deletions(-)
\r
91 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
92 > index 6081245..f98f8cf 100644
\r
93 > --- a/emacs/notmuch.el
\r
94 > +++ b/emacs/notmuch.el
\r
95 > @@ -158,18 +158,19 @@ prefix argument. PREFIX and TAIL are used internally."
\r
96 > (notmuch-describe-keymap
\r
97 > binding ua-keys (notmuch-prefix-key-description key) tail)))
\r
100 Change "t" to "binding" instead of wrapping the whole body in an unless?
\r
102 > - (when (and ua-keys (symbolp binding)
\r
103 > - (get binding 'notmuch-prefix-doc))
\r
104 > - ;; Documentation for prefixed command
\r
105 > - (let ((ua-desc (key-description ua-keys)))
\r
106 > - (push (concat ua-desc " " prefix (format-kbd-macro (vector key))
\r
107 > - "\t" (get binding 'notmuch-prefix-doc))
\r
109 > - ;; Documentation for command
\r
110 > - (push (concat prefix (format-kbd-macro (vector key)) "\t"
\r
111 > - (or (and (symbolp binding) (get binding 'notmuch-doc))
\r
112 > - (notmuch-documentation-first-line binding)))
\r
114 > + (unless (not binding)
\r
115 > + (when (and ua-keys (symbolp binding)
\r
116 > + (get binding 'notmuch-prefix-doc))
\r
117 > + ;; Documentation for prefixed command
\r
118 > + (let ((ua-desc (key-description ua-keys)))
\r
119 > + (push (concat ua-desc " " prefix (format-kbd-macro (vector key))
\r
120 > + "\t" (get binding 'notmuch-prefix-doc))
\r
122 > + ;; Documentation for command
\r
123 > + (push (concat prefix (format-kbd-macro (vector key)) "\t"
\r
124 > + (or (and (symbolp binding) (get binding 'notmuch-doc))
\r
125 > + (notmuch-documentation-first-line binding)))
\r
133 > _______________________________________________
\r
134 > notmuch mailing list
\r
135 > notmuch@notmuchmail.org
\r
136 > http://notmuchmail.org/mailman/listinfo/notmuch
\r