[PATCH 4/4] contrib: pick: use remap for the over-ridden global bindings
authorMark Walters <markwalters1009@gmail.com>
Sat, 26 Oct 2013 21:04:39 +0000 (22:04 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:40 +0000 (09:57 -0800)
6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf [new file with mode: 0644]

diff --git a/6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf b/6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf
new file mode 100644 (file)
index 0000000..fda96cf
--- /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 5138D421165\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:05:03 -0700 (PDT)\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 fVwuO4nE1mbh for <notmuch@notmuchmail.org>;\r
+       Sat, 26 Oct 2013 14:04:58 -0700 (PDT)\r
+Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com\r
+       [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id EBA02429E4D\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:04:50 -0700 (PDT)\r
+Received: by mail-wi0-f172.google.com with SMTP id ez12so2398677wid.11\r
+       for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:04:49 -0700 (PDT)\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=9eVIMVpAcEM9uHHI3P9vWywsELfTQs9gq5GSnSLSKQc=;\r
+       b=CGnfRo5y3n2waV8Hbo+1IUd1pFUN/Jpe5jo0IP5n3K2O5/Z5f+pMa9kGpZANKJCK2I\r
+       nst7x2uoL95pL89QO1ZVKr6CTPtFxG2INGvEG0hvumwR/bdIGrViI/nO6771U1vZxkqM\r
+       fJZPepYGnWOYmJFnRNSza8nGdehHpAatEEk8Lxy70fa0wjm/RQNMlWLttat3/9VjGgFW\r
+       2amG06XBxO24Ub+0nZshM+V2TJR1r7h5AA5iZ3ZmcGy2YOCAC6IS3Suw9A/1KvEU3EWR\r
+       1Uew2/hiircUTOW8xAUlv0ldB1bekjcam6bT9xNzR/ZJRF14xp/n+BUT2ygseSoTk9RV\r
+       ZhnQ==\r
+X-Received: by 10.180.80.105 with SMTP id q9mr3404693wix.18.1382821489741;\r
+       Sat, 26 Oct 2013 14:04:49 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id fb4sm19391209wib.8.2013.10.26.14.04.49\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 26 Oct 2013 14:04:49 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 4/4] contrib: pick: use remap for the over-ridden global\r
+       bindings\r
+Date: Sat, 26 Oct 2013 22:04:39 +0100\r
+Message-Id: <1382821479-23384-5-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1382821479-23384-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1382821479-23384-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: Sat, 26 Oct 2013 21:05:03 -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 pick versions of them too.\r
+\r
+[Pick overrides these to do things like close the message pane before\r
+doing the action, so the functionality is very close to the original\r
+common keymap function.]\r
+---\r
+ contrib/notmuch-pick/notmuch-pick.el |    8 ++++----\r
+ 1 files changed, 4 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+index 156ea6d..73f6501 100644\r
+--- a/contrib/notmuch-pick/notmuch-pick.el\r
++++ b/contrib/notmuch-pick/notmuch-pick.el\r
+@@ -226,13 +226,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-pick-close-message-pane-and #'notmuch-help))\r
++    (define-key map [remap notmuch-help] (notmuch-pick-close-message-pane-and #'notmuch-help))\r
+     ;; Override because we first close message pane and then close pick buffer.\r
+-    (define-key map "q" 'notmuch-pick-quit)\r
++    (define-key map [remap notmuch-kill-this-buffer] 'notmuch-pick-quit)\r
+     ;; Override because we close message pane after the search query is entered.\r
+-    (define-key map "s" 'notmuch-pick-to-search)\r
++    (define-key map [remap notmuch-search] 'notmuch-pick-to-search)\r
+     ;; Override because we want to close message pane first.\r
+-    (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))\r
++    (define-key map [remap notmuch-mua-new-mail] (notmuch-pick-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