[PATCH v4 7/7] emacs: tree: use remap for the over-ridden global bindings
authorMark Walters <markwalters1009@gmail.com>
Tue, 12 Nov 2013 20:10:59 +0000 (20:10 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:13 +0000 (09:58 -0800)
c0/d5459544b25f836cfe1058fd30b2ae6650fe42 [new file with mode: 0644]

diff --git a/c0/d5459544b25f836cfe1058fd30b2ae6650fe42 b/c0/d5459544b25f836cfe1058fd30b2ae6650fe42
new file mode 100644 (file)
index 0000000..fe37e9f
--- /dev/null
@@ -0,0 +1,101 @@
+Return-Path: <markwalters1009@gmail.com>\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 AFC13431FD7\r
+       for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:17:12 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] 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 JRWNHeaMowTY for <notmuch@notmuchmail.org>;\r
+       Tue, 12 Nov 2013 12:17:07 -0800 (PST)\r
+Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com\r
+ [74.125.82.46])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 08C4D431FCF   for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:17:06 -0800\r
+ (PST)\r
+Received: by mail-wg0-f46.google.com with SMTP id x12so2121579wgg.25\r
+       for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:17:03 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+       bh=f4kWvHmYOseo5nf8oKQvCNywRigDgqsad7Dg87gy0Vo=;\r
+       b=XNvjHpfnUj6hD2Hoco+FYTqEauPY6zp7gLXmObpRzKV8TWDD0onzf5D8g7iOBwG7Sp\r
+       OaajZI2y9tdaDsTHBHW3RDE/n3+Eny3DiM2xSS7zVnHmBI2KPyMj/29zNWTDrl28+5/F\r
+       PYOkCLGzfhSzwJWs5dPFJEJvGjFHT6RvsFiFTOREKOst+qvJvct1zFFoLV5YEkuYC4V0\r
+       OhaRTU3nnWSepFqiF1mC2dBXtesuFsXD1cRGo2rUhrt5j0wYk7bbSIk4KgDST+1bBOMu\r
+       PlemBTKgYm1fw9Kh6HkT2e1AJnD+BStzINfiCR/oDywutsq+jq97ulRC4Mgt4rlIL118\r
+       smuA==\r
+X-Received: by 10.180.83.194 with SMTP id s2mr18088685wiy.60.1384287081567;\r
+       Tue, 12 Nov 2013 12:11:21 -0800 (PST)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id\r
+       ey4sm48141160wic.11.2013.11.12.12.11.20 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Tue, 12 Nov 2013 12:11:21 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 7/7] emacs: tree: use remap for the over-ridden global\r
+       bindings\r
+Date: Tue, 12 Nov 2013 20:10:59 +0000\r
+Message-Id: <1384287059-3525-8-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>\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: Tue, 12 Nov 2013 20:17:12 -0000\r
+\r
+Following a suggestion by Austin in id:20130915153642.GY1426@mit.edu\r
+we use remap for the over-riding bindings in pick. This means that if\r
+the user modifies the global keymap these modifications will happen in\r
+the tree-view versions of them too.\r
+\r
+[tree-view overrides these to do things like close the message pane\r
+before doing the action, so the functionality is very close to the\r
+original common keymap function.]\r
+---\r
+ emacs/notmuch-tree.el |    8 ++++----\r
+ 1 files changed, 4 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index f13b41f..8d59e65 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -220,13 +220,13 @@ FUNC."\r
+     (set-keymap-parent map notmuch-common-keymap)\r
+     ;; The following override the global keymap.\r
+     ;; Override because we want to close message pane first.\r
+-    (define-key map "?" (notmuch-tree-close-message-pane-and #'notmuch-help))\r
++    (define-key map [remap notmuch-help] (notmuch-tree-close-message-pane-and #'notmuch-help))\r
+     ;; Override because we first close message pane and then close tree buffer.\r
+-    (define-key map "q" 'notmuch-tree-quit)\r
++    (define-key map [remap notmuch-kill-this-buffer] 'notmuch-tree-quit)\r
+     ;; Override because we close message pane after the search query is entered.\r
+-    (define-key map "s" 'notmuch-tree-to-search)\r
++    (define-key map [remap notmuch-search] 'notmuch-tree-to-search)\r
+     ;; Override because we want to close message pane first.\r
+-    (define-key map "m" (notmuch-tree-close-message-pane-and #'notmuch-mua-new-mail))\r
++    (define-key map [remap notmuch-mua-new-mail] (notmuch-tree-close-message-pane-and #'notmuch-mua-new-mail))\r
\r
+     ;; these use notmuch-show functions directly\r
+     (define-key map "|" 'notmuch-show-pipe-message)\r
+-- \r
+1.7.9.1\r
+\r