From 6360750ecdb6ddb4c5aa8ad79d173fabc6a1a9f3 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 8 Nov 2013 00:21:31 +0000 Subject: [PATCH] [PATCH v2 0/5] emacs: help: and remap keybindings --- 62/9faa587b6d7dfa7a223a7305cddd0637c5e6fc | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 62/9faa587b6d7dfa7a223a7305cddd0637c5e6fc diff --git a/62/9faa587b6d7dfa7a223a7305cddd0637c5e6fc b/62/9faa587b6d7dfa7a223a7305cddd0637c5e6fc new file mode 100644 index 000000000..be8e5afce --- /dev/null +++ b/62/9faa587b6d7dfa7a223a7305cddd0637c5e6fc @@ -0,0 +1,103 @@ +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 6C794429E2E + for ; Thu, 7 Nov 2013 16:29:26 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.7 +X-Spam-Level: ** +X-Spam-Status: No, score=2.7 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, + FREEMAIL_REPLY=2.499, 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 ngaQBLKOhiZu for ; + Thu, 7 Nov 2013 16:29:19 -0800 (PST) +Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com + [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B2664429E26 + for ; Thu, 7 Nov 2013 16:29:19 -0800 (PST) +Received: by mail-wi0-f175.google.com with SMTP id hm2so216157wib.2 + for ; Thu, 07 Nov 2013 16:29:18 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id; + bh=fLjTKfkRS26cK86KzmNyaFPXSzoBndeVNSVRwK6ZqmY=; + b=MO/mr8EbY3jpqvjE0I8X/7GmR0s4dXiAxcsF0keZnYd4RfuNceP92u94pkgD3I1kK1 + SKpg/DS0AMJ4qe+vtCMzMsL+piISGgpjY65dWdR18293Zu3FN3N/yFNMebNsKVowJII9 + gcWy0IcWTDL/avS+5apaBw+1awSfYpTa522f92jmZTM0EBVJUHY1wNkvnv4DlWCvzZx0 + 4JnYv6jsYXNpYMvTKOK4gZmzEbC6suMlY27m+svGnLFJtpj/z36J7OwK4wmtWO8tH/84 + pH63LxBEq+2cAbVGccaHV6ULu4x6XpyOgKABcKYZTMzXrY19oZqZRmv9SUBIjLQXkleG + xY+Q== +X-Received: by 10.180.13.142 with SMTP id h14mr102822wic.3.1383870101852; + Thu, 07 Nov 2013 16:21:41 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id e1sm400551wij.6.2013.11.07.16.21.41 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Thu, 07 Nov 2013 16:21:41 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 0/5] emacs: help: and remap keybindings +Date: Fri, 8 Nov 2013 00:21:31 +0000 +Message-Id: <1383870096-14627-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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: Fri, 08 Nov 2013 00:29:26 -0000 + +This is version 2 of the series id:1382821479-23384-1-git-send-email-markwalters1009@gmail.com + +It fixes most of the comments Austin raised in his review. + +The first patch is now trivial and fixes a bug with unset keys in +help. (This is Austin's solution which is obviously better than mine +was) + +The second patch is unchanged. The third patch is new and just +separates out a helper function. This will make the remapping help +code clearer, but is probably good in its own right. + +The fourth patch deals with help for the remapping case. It is +completely separate from the main help so does not clutter it up like +it did before. The logic is slightly different from before: it now +puts all remapped bindings in rather than just the first (if the +command being remapped was bound to multiple keys). + +The fifth patch adds remappings to tree and is unchanged. + +It does not address Austin's query about passing down the base keymap +for the remapping. + +Best wishes + +Mark + + +Mark Walters (5): + emacs: help: check for nil key binding + emacs: help: remove duplicate bindings + emacs: help: split out notmuch-describe-key as a function + emacs: help: add a special function to deal with remaps + emacs: tree: use remap for the over-ridden global bindings + + emacs/notmuch-lib.el | 76 +++++++++++++++++++++++++++++++++++------------- + emacs/notmuch-tree.el | 8 ++-- + 2 files changed, 59 insertions(+), 25 deletions(-) + +-- +1.7.9.1 + -- 2.26.2