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 arlo.cworth.org (Postfix) with ESMTP id E1C596DE1930
\r
6 for <notmuch@notmuchmail.org>; Thu, 12 Nov 2015 03:02:30 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.175 tagged_above=-999 required=5 tests=[AWL=0.395,
\r
12 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,
\r
14 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]
\r
16 Received: from arlo.cworth.org ([127.0.0.1])
\r
17 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
18 with ESMTP id 0sIjfAI8-flF for <notmuch@notmuchmail.org>;
\r
19 Thu, 12 Nov 2015 03:02:27 -0800 (PST)
\r
20 Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com
\r
21 [74.125.82.54]) by arlo.cworth.org (Postfix) with ESMTPS id AB5086DE1583 for
\r
22 <notmuch@notmuchmail.org>; Thu, 12 Nov 2015 03:02:26 -0800 (PST)
\r
23 Received: by wmvv187 with SMTP id v187so26897016wmv.1
\r
24 for <notmuch@notmuchmail.org>; Thu, 12 Nov 2015 03:02:24 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id;
\r
27 bh=RK2lR7VAgblBNVhf9ZkMp36pT/stVS9lwgiHs8o7MPY=;
\r
28 b=bcJwVPE3bCwHdAHWbGeQcqGhi1ZVaN9lYMwJvsHPhxZC+NV0wnJHnewoNdzpw8XRMk
\r
29 NqInOfkETzliTlG7NrYa+kcpIVG+LZSMOe+sA/SJfOVZepzhepU3fCw37FmyzrpCCjpw
\r
30 L5SRWYhu0YF03KjRwno0UvsLiXZwhZ14EOwrKJ3U1u0QlRtILZzjDs0KzkiVGKN/Q2US
\r
31 JkIoXUS6y//yOezfQgcI7H6c20t8Ky1mK01rj35g9ApPL4G0PdiQyABlvTs+Tw1/pqUS
\r
32 JMxyfv5fGfs7Ab3Iq+nNyUYIVt5MoFZtL198RCE/HPBWgT6PboOJ5F/pozmTxmc7sC5x
\r
34 X-Received: by 10.194.62.73 with SMTP id w9mr14868419wjr.126.1447326144480;
\r
35 Thu, 12 Nov 2015 03:02:24 -0800 (PST)
\r
36 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])
\r
37 by smtp.gmail.com with ESMTPSA id z13sm8201631wjr.47.2015.11.12.03.02.22
\r
38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
39 Thu, 12 Nov 2015 03:02:23 -0800 (PST)
\r
40 From: Mark Walters <markwalters1009@gmail.com>
\r
41 To: notmuch@notmuchmail.org
\r
42 Subject: [PATCH] emacs: hello: fix accidental modification of widget-keymap
\r
43 Date: Thu, 12 Nov 2015 11:02:19 +0000
\r
44 Message-Id: <1447326139-13620-1-git-send-email-markwalters1009@gmail.com>
\r
45 X-Mailer: git-send-email 2.1.4
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.20
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Thu, 12 Nov 2015 11:02:31 -0000
\r
60 In emacs24 we use make-composed-keymap. It seems that if only a single
\r
61 map is specified then emacs just resuses it rather than creating a
\r
62 copy of it. Thus use make-sparse-keymap to force a copy.
\r
65 pseudomyne and the diredful author thamer found that we modify
\r
66 widget-keymap in notmuch. We clearly don't want to, and I think we
\r
67 tried not to, but emacs was being clever and reused the old keymap
\r
68 rather than creating a new one.
\r
70 Anyway the following patch seems to work, and if the user modifies
\r
71 widget-keymap deliberately then it does get inherited by notmuch-hello
\r
72 (which was the point of make-composed-keymap rather than just
\r
73 copy-keymap in the first place).
\r
75 The bug only occurs in emacs24. I essentially only use emacs23 so it
\r
76 has not been tested much.
\r
85 emacs/notmuch-hello.el | 8 ++++++--
\r
86 1 file changed, 6 insertions(+), 2 deletions(-)
\r
88 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
89 index 8bde808..b42e0f2 100644
\r
90 --- a/emacs/notmuch-hello.el
\r
91 +++ b/emacs/notmuch-hello.el
\r
92 @@ -652,8 +652,12 @@ with `notmuch-hello-query-counts'."
\r
94 (defvar notmuch-hello-mode-map
\r
95 (let ((map (if (fboundp 'make-composed-keymap)
\r
96 - ;; Inherit both widget-keymap and notmuch-common-keymap
\r
97 - (make-composed-keymap widget-keymap)
\r
98 + ;; Inherit both widget-keymap and
\r
99 + ;; notmuch-common-keymap. We have to use
\r
100 + ;; make-sparse-keymap to force this to be a new
\r
101 + ;; keymap (so that when we modify map it does not
\r
102 + ;; modify widget-keymap).
\r
103 + (make-composed-keymap (list (make-sparse-keymap) widget-keymap))
\r
104 ;; Before Emacs 24, keymaps didn't support multiple
\r
105 ;; inheritance,, so just copy the widget keymap since
\r
106 ;; it's unlikely to change.
\r