From 4217e28666518cd125c70d938ec28cf4c7885ff0 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 26 Oct 2013 22:04:39 +0100 Subject: [PATCH] [PATCH 4/4] contrib: pick: use remap for the over-ridden global bindings --- 6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf diff --git a/6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf b/6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf new file mode 100644 index 000000000..fda96cfc9 --- /dev/null +++ b/6e/3b1a5efa6c64cfb19e57b1110b0e300f31aadf @@ -0,0 +1,101 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 5138D421165 + for ; Sat, 26 Oct 2013 14:05:03 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id fVwuO4nE1mbh for ; + Sat, 26 Oct 2013 14:04:58 -0700 (PDT) +Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com + [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id EBA02429E4D + for ; Sat, 26 Oct 2013 14:04:50 -0700 (PDT) +Received: by mail-wi0-f172.google.com with SMTP id ez12so2398677wid.11 + for ; Sat, 26 Oct 2013 14:04:49 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=9eVIMVpAcEM9uHHI3P9vWywsELfTQs9gq5GSnSLSKQc=; + b=CGnfRo5y3n2waV8Hbo+1IUd1pFUN/Jpe5jo0IP5n3K2O5/Z5f+pMa9kGpZANKJCK2I + nst7x2uoL95pL89QO1ZVKr6CTPtFxG2INGvEG0hvumwR/bdIGrViI/nO6771U1vZxkqM + fJZPepYGnWOYmJFnRNSza8nGdehHpAatEEk8Lxy70fa0wjm/RQNMlWLttat3/9VjGgFW + 2amG06XBxO24Ub+0nZshM+V2TJR1r7h5AA5iZ3ZmcGy2YOCAC6IS3Suw9A/1KvEU3EWR + 1Uew2/hiircUTOW8xAUlv0ldB1bekjcam6bT9xNzR/ZJRF14xp/n+BUT2ygseSoTk9RV + ZhnQ== +X-Received: by 10.180.80.105 with SMTP id q9mr3404693wix.18.1382821489741; + Sat, 26 Oct 2013 14:04:49 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id fb4sm19391209wib.8.2013.10.26.14.04.49 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 26 Oct 2013 14:04:49 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 4/4] contrib: pick: use remap for the over-ridden global + bindings +Date: Sat, 26 Oct 2013 22:04:39 +0100 +Message-Id: <1382821479-23384-5-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1382821479-23384-1-git-send-email-markwalters1009@gmail.com> +References: <1382821479-23384-1-git-send-email-markwalters1009@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 26 Oct 2013 21:05:03 -0000 + +Following a suggestion by Austin in id:20130915153642.GY1426@mit.edu +we use remap for the over-riding bindings in pick. This means that if +the user modifies the global keymap these modifications will happen in +the pick versions of them too. + +[Pick overrides these to do things like close the message pane before +doing the action, so the functionality is very close to the original +common keymap function.] +--- + contrib/notmuch-pick/notmuch-pick.el | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 156ea6d..73f6501 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -226,13 +226,13 @@ FUNC." + (set-keymap-parent map notmuch-common-keymap) + ;; The following override the global keymap. + ;; Override because we want to close message pane first. +- (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help)) ++ (define-key map [remap notmuch-help] (notmuch-pick-close-message-pane-and #'notmuch-help)) + ;; Override because we first close message pane and then close pick buffer. +- (define-key map "q" 'notmuch-pick-quit) ++ (define-key map [remap notmuch-kill-this-buffer] 'notmuch-pick-quit) + ;; Override because we close message pane after the search query is entered. +- (define-key map "s" 'notmuch-pick-to-search) ++ (define-key map [remap notmuch-search] 'notmuch-pick-to-search) + ;; Override because we want to close message pane first. +- (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail)) ++ (define-key map [remap notmuch-mua-new-mail] (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail)) + + ;; these use notmuch-show functions directly + (define-key map "|" 'notmuch-show-pipe-message) +-- +1.7.9.1 + -- 2.26.2