From: Pieter Praet <pieter@praet.org>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes
Date: Sat, 16 Apr 2011 15:12:43 +0200 [thread overview]
Message-ID: <87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> (raw)
Calling notmuch-help in notmuch-hello-mode results in error
"apply: Wrong type argument: listp, keymap"
As this is the very first screen new users see, a failing
notmuch-help can be considered a marketing catastrophe.
Appears to be in introduced in commit 9ccd978665103a20
(patch id:"1273857338-20127-1-git-send-email-nelhage@mit.edu").
This patch makes notmuch-hello-mode-map consistent with
notmuch-show-mode-map and notmuch-search-mode-map.
To keep everything in working order, awaiting a real fix,
I copied in widget-keymap's bindings (as defined in "wid-edit.el").
Signed-off-by: Pieter Praet <pieter@praet.org>
---
emacs/notmuch-hello.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index e58dd24..1193f74 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -290,7 +290,17 @@ should be. Returns a cons cell `(tags-per-line width)'."
(defvar notmuch-hello-mode-map
(let ((map (make-sparse-keymap)))
- (set-keymap-parent map widget-keymap)
+ ; TODO make this play nice with notmuch-help:
+ ; (set-keymap-parent map widget-keymap)
+ ; In the meantime, make due with a copy of widget-keymap's contents:
+ (define-key map "\t" 'widget-forward)
+ (define-key map "\e\t" 'widget-backward)
+ (define-key map [(shift tab)] 'advertised-widget-backward)
+ (define-key map [backtab] 'widget-backward)
+ (define-key map [down-mouse-2] 'widget-button-click)
+ (define-key map [down-mouse-1] 'widget-button-click)
+ (define-key map [(control ?m)] 'widget-button-press)
+ ; end of widget-keymap's contents
(define-key map "v" '(lambda () "Display the notmuch version" (interactive)
(message "notmuch version %s" (notmuch-version))))
(define-key map "?" 'notmuch-help)
--
1.7.1
next reply other threads:[~2011-04-16 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-16 13:12 Pieter Praet [this message]
2011-11-11 17:29 ` [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes David Bremner
2011-11-16 10:56 ` Pieter Praet
2011-12-30 11:37 ` [PATCH] emacs: Better handling of inherited keymaps for `nomuch-help' David Edmondson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me \
--to=pieter@praet.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).