unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes
@ 2011-04-16 13:12 Pieter Praet
  2011-11-11 17:29 ` David Bremner
  2011-12-30 11:37 ` [PATCH] emacs: Better handling of inherited keymaps for `nomuch-help' David Edmondson
  0 siblings, 2 replies; 4+ messages in thread
From: Pieter Praet @ 2011-04-16 13:12 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-30 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-16 13:12 [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes Pieter Praet
2011-11-11 17:29 ` 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

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).