1 Return-Path: <markwalters1009@gmail.com>
\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 16CC1431FD7
\r
6 for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:16:40 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.7 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id oHgV7m3xzVDR for <notmuch@notmuchmail.org>;
\r
18 Tue, 12 Nov 2013 12:16:32 -0800 (PST)
\r
19 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com
\r
20 [74.125.82.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 8FE6D431FCF
\r
23 for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:16:32 -0800 (PST)
\r
24 Received: by mail-we0-f171.google.com with SMTP id t61so3228896wes.30
\r
25 for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:16:27 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id;
\r
28 bh=myvFFB2RpJ8MsIO9Kja+GUxb0h+8EyOZoz38NkJ7lVI=;
\r
29 b=ozzpL0Iy+ixjbAANUMPEPOR/0m8z18gMxTglKjzHPW7ycC+I+L0x81aRXr0nfqif0E
\r
30 9uIs2qyJc+9POaWGZH8MX0AHAmrV1K4CYuB4faDygT4x8HlywUJSYwuA1D+ZXfy9db4M
\r
31 gdMiYP3J38BiALbpE0Jsch4JTCbxBWB7SUydPvYFCkc6kH8Br6ZTEjj+LPXiMJHU4wvw
\r
32 eBfOejU/w9ScY1E5bpjiPvkd8aTAn9a/iIPTH797d2hAR6XguDcqvLm/t2Vr6/cm19nP
\r
33 AS8smy5LSq+AIVTX9+jiUBQyBIbigvwqdvinDugnrOMckjDiaHRCHi3HNctksPT8vp4b
\r
35 X-Received: by 10.180.37.227 with SMTP id b3mr17740337wik.24.1384287065082;
\r
36 Tue, 12 Nov 2013 12:11:05 -0800 (PST)
\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])
\r
38 by mx.google.com with ESMTPSA id
\r
39 ft19sm47895052wic.5.2013.11.12.12.11.03 for <multiple recipients>
\r
40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
41 Tue, 12 Nov 2013 12:11:04 -0800 (PST)
\r
42 From: Mark Walters <markwalters1009@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v4 0/7] emacs: help: remap keybindings
\r
45 Date: Tue, 12 Nov 2013 20:10:52 +0000
\r
46 Message-Id: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.9.1
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Tue, 12 Nov 2013 20:16:40 -0000
\r
62 This is v4 of this patch set. v3 is at id:1383932419-12533-1-git-send-email-markwalters1009@gmail.com.
\r
64 David found a bug in v3 which I tracked down to some match-data being
\r
65 over-written. This included the bugfix
\r
66 id:1384076682-16872-1-git-send-email-markwalters1009@gmail.com which
\r
67 is folded into this series as the second patch.
\r
69 The diff v3+bugfix is below: it does the save-match-data as Austin
\r
70 suggested, and it removes an accidental added comment which I put in
\r
71 when finding the bug.
\r
73 I have also left off the last "testing patch" (a patch that added some
\r
74 functionality to make it easier to test the help routine but not
\r
75 something that should be added to mainline)
\r
81 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
82 index 20ed1fb..0655bdd 100644
\r
83 --- a/emacs/notmuch-lib.el
\r
84 +++ b/emacs/notmuch-lib.el
\r
85 @@ -305,16 +305,15 @@ prefix argument. PREFIX and TAIL are used internally."
\r
86 (defun notmuch-substitute-command-keys (doc)
\r
87 "Like `substitute-command-keys' but with documentation, not function names."
\r
89 - (while (string-match "\\\\{\\([^}[:space:]]*\\)}" doc beg) ;; matches \{not-space}
\r
90 + (while (string-match "\\\\{\\([^}[:space:]]*\\)}" doc beg)
\r
93 (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))
\r
94 (keymap (symbol-value (intern keymap-name)))
\r
95 (ua-keys (where-is-internal 'universal-argument keymap t))
\r
96 (desc-alist (notmuch-describe-keymap keymap ua-keys keymap))
\r
97 - (desc-list (mapcar (lambda (arg) (concat (car arg) "\t" (cdr arg))) desc-alist))
\r
98 - (desc (mapconcat #'identity desc-list "\n")))
\r
100 + (desc-list (mapcar (lambda (arg) (concat (car arg) "\t" (cdr arg))) desc-alist)))
\r
101 + (mapconcat #'identity desc-list "\n")))))
\r
102 (setq doc (replace-match desc 1 1 doc)))
\r
103 (setq beg (match-end 0)))
\r
110 emacs: help: check for nil key binding
\r
111 emacs: help: save-match-data
\r
112 emacs: help: remove duplicate bindings
\r
113 emacs: help: split out notmuch-describe-key as a function
\r
114 emacs: help: add base-keymap
\r
115 emacs: help: add a special function to deal with remaps
\r
116 emacs: tree: use remap for the over-ridden global bindings
\r
118 emacs/notmuch-lib.el | 85 ++++++++++++++++++++++++++++++++++--------------
\r
119 emacs/notmuch-tree.el | 8 ++--
\r
120 2 files changed, 64 insertions(+), 29 deletions(-)
\r