From a175d4951ac30cdeb66a6368945630768268910a Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 26 Oct 2013 22:04:35 +0100 Subject: [PATCH] [PATCH 0/4] emacs: help: and remap keybindings --- e7/6d312a714f0d0cea178749e904d7066cf8a774 | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 e7/6d312a714f0d0cea178749e904d7066cf8a774 diff --git a/e7/6d312a714f0d0cea178749e904d7066cf8a774 b/e7/6d312a714f0d0cea178749e904d7066cf8a774 new file mode 100644 index 000000000..627fe00ef --- /dev/null +++ b/e7/6d312a714f0d0cea178749e904d7066cf8a774 @@ -0,0 +1,109 @@ +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 88B61429E42 + for ; Sat, 26 Oct 2013 14:04:54 -0700 (PDT) +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 rHPK8qOC6yhH for ; + Sat, 26 Oct 2013 14:04:47 -0700 (PDT) +Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com + [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 62BE0431FD9 + for ; Sat, 26 Oct 2013 14:04:47 -0700 (PDT) +Received: by mail-wi0-f181.google.com with SMTP id ex4so20050wid.14 + for ; Sat, 26 Oct 2013 14:04:43 -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; + bh=75uxND67qOFp94HOPwHU3ex8UVh3kTPPbZF5qvS38Z8=; + b=voVMaQsl/l5Rp7QrE4hJ667SUltOTnHv1GzEHNQ/zT0v3NUzcKnntiePGoab/ENY2H + i84bsA+BMyWFyrlNiRhaYs/e/kigvDpXrkjeFePkT8nJSTa372Jd8PGCOgRrFSs8n3SN + MzkQI44dfHgs2p6NLpw2hTn8sDn9kQz7bRIkauyr/gVTK8bu8fC6EZd2ovR7hYuUFJjQ + iZZScx7zh8qe7TJuZQtlEfEcyJGKDAXqMR6hAROmLQ5xv0X+byLMtetwtsU5rlkSVAH9 + k7MNRJ6Av1ivoTpE7SKIKN9kxW51oE8hySxpalwRYLYYnopqNF5C+ZwLsfBzHC5/eXja + VTGQ== +X-Received: by 10.181.9.66 with SMTP id dq2mr3382039wid.31.1382821483571; + Sat, 26 Oct 2013 14:04:43 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id q3sm19392494wib.5.2013.10.26.14.04.42 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 26 Oct 2013 14:04:43 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/4] emacs: help: and remap keybindings +Date: Sat, 26 Oct 2013 22:04:35 +0100 +Message-Id: <1382821479-23384-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: Sat, 26 Oct 2013 21:04:54 -0000 + +This series makes 3 tweaks to the emacs help. + +The first fixes a bug whereby if a user unsets a keybinding +notmuch-help throws an error (function being nil) and does not work. + +The second removes duplicates from the list of returned keybindings; +these occur if a user or mode overrides a keybinding in +notmuch-common-keymap. This happens in pick. See +id:1381498794-17000-1-git-send-email-markwalters1009@gmail.com for a +different approach. I think this is probably neater but am happy +either way. + +The third patch fixes some problems if a user or mode rebinds keys +using remap. Currently they appear in help as " New +function docstring". This patch replaces the with +the actual key binding. + +The final patch is separate but is the actual motivation for the +earlier ones. It switches pick to use remap for its over +bindings. This means the over bindings will work correctly if the user +customises the common-keymap. This approach was suggested by Austin in +id:20130915153642.GY1426@mit.edu. + +All tests pass and it seems to work including modifications to the +common-keymap. + +Best wishes + +Mark + +PS Obviously the final patch will clash with a rename of pick to tree, +but the rebase will be trivial. + + + +Mark Walters (4): + emacs: help: check for nil key binding + emacs: help: remove duplicate bindings + emacs: help: remap support + contrib: pick: use remap for the over-ridden global bindings + + contrib/notmuch-pick/notmuch-pick.el | 8 ++-- + emacs/notmuch.el | 58 +++++++++++++++++++++------------- + 2 files changed, 40 insertions(+), 26 deletions(-) + +-- +1.7.9.1 + -- 2.26.2