--- /dev/null
+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 DB2CC431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 15 Sep 2013 01:18:00 -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 Y4Cs6SPBF8bq for <notmuch@notmuchmail.org>;\r
+ Sun, 15 Sep 2013 01:17:55 -0700 (PDT)\r
+Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com\r
+ [74.125.82.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 2BE9B431FAE for <notmuch@notmuchmail.org>; Sun, 15 Sep 2013 01:17:55 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f54.google.com with SMTP id m15so2629184wgh.9\r
+ for <notmuch@notmuchmail.org>; Sun, 15 Sep 2013 01:17:54 -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;\r
+ bh=ivHaA+d1Qq6hEI8HmgSErJSboTZoky+SABe4IRludcc=;\r
+ b=n4jiyxXSI90dUZgnjaToZ8iPDx74L4Lu8DNFgNw/z+7WOAm0XeuxfQATD+FXRN0FLF\r
+ PK+a5Ym18JgJNDMrCLwF7At0NIMhl/EvL95/QbVlQ2Jxfevqilmga0PjunZr7//oLntV\r
+ oAHvRCgAfv1Nhevui8FmF1S+qfrufSdX2u75aYrGgZBuaNRLcjOiQnrbXXXQqGFRl03q\r
+ X2ikSC+No2YPpvnQbZMQFJGWXKC4MCxMgsjpamg6tLWK2TrsCZepgr6/rR145a1iq/Ck\r
+ s5TDcH/WX3ek1IP2jsvYwyrVaJRU1V/oO/cOYfDaIl9RGghVDPfqA6XvggB9DL5GBW+b\r
+ OIig==\r
+X-Received: by 10.194.22.97 with SMTP id c1mr44781wjf.43.1379233074017;\r
+ Sun, 15 Sep 2013 01:17:54 -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 gp9sm14873159wib.8.1969.12.31.16.00.00\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sun, 15 Sep 2013 01:17:53 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] contrib: pick: use global keymap\r
+Date: Sun, 15 Sep 2013 09:17:48 +0100\r
+Message-Id: <1379233068-9626-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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: Sun, 15 Sep 2013 08:18:01 -0000\r
+\r
+Austin recently introduced a new global keymap. This makes pick use\r
+this global map.\r
+\r
+In most cases pick needs to override this global map because\r
+it wants to close the message pane before doing the action. However,\r
+this documents the over-rides and makes it less likely that the pick\r
+bindings will get out of sync with the main bindings.\r
+---\r
+ contrib/notmuch-pick/notmuch-pick.el | 16 ++++++++++++----\r
+ 1 files changed, 12 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
+index cba9549..01ca4bd 100644\r
+--- a/contrib/notmuch-pick/notmuch-pick.el\r
++++ b/contrib/notmuch-pick/notmuch-pick.el\r
+@@ -230,6 +230,17 @@ FUNC."\r
+ \r
+ (defvar notmuch-pick-mode-map\r
+ (let ((map (make-sparse-keymap)))\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
++ ;; Override because we first close message pane and then close pick buffer.\r
++ (define-key map "q" '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
++ ;; 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
++\r
+ (define-key map [mouse-1] 'notmuch-pick-show-message)\r
+ ;; these use notmuch-show functions directly\r
+ (define-key map "|" 'notmuch-show-pipe-message)\r
+@@ -244,20 +255,16 @@ FUNC."\r
+ (define-key map "e" (notmuch-pick-to-message-pane #'notmuch-pick-button-activate))\r
+ \r
+ ;; bindings from show (or elsewhere) but we close the message pane first.\r
+- (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))\r
+ (define-key map "f" (notmuch-pick-close-message-pane-and #'notmuch-show-forward-message))\r
+ (define-key map "r" (notmuch-pick-close-message-pane-and #'notmuch-show-reply-sender))\r
+ (define-key map "R" (notmuch-pick-close-message-pane-and #'notmuch-show-reply))\r
+ (define-key map "V" (notmuch-pick-close-message-pane-and #'notmuch-show-view-raw-message))\r
+- (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))\r
+ \r
+ ;; The main pick bindings\r
+- (define-key map "q" 'notmuch-pick-quit)\r
+ (define-key map "x" 'notmuch-pick-quit)\r
+ (define-key map "A" 'notmuch-pick-archive-thread)\r
+ (define-key map "a" 'notmuch-pick-archive-message-then-next)\r
+ (define-key map "=" 'notmuch-pick-refresh-view)\r
+- (define-key map "s" 'notmuch-pick-to-search)\r
+ (define-key map "z" 'notmuch-pick-to-pick)\r
+ (define-key map "n" 'notmuch-pick-next-matching-message)\r
+ (define-key map "p" 'notmuch-pick-prev-matching-message)\r
+@@ -849,6 +856,7 @@ Complete list of currently available key bindings:\r
+ \r
+ (interactive)\r
+ (kill-all-local-variables)\r
++ (setq notmuch-buffer-refresh-function #'notmuch-pick-refresh-view)\r
+ (use-local-map notmuch-pick-mode-map)\r
+ (setq major-mode 'notmuch-pick-mode\r
+ mode-name "notmuch-pick")\r
+-- \r
+1.7.9.1\r
+\r