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 34880431FB6 for ; Sat, 16 Apr 2011 06:17:30 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 YmLY9N+3uWsq for ; Sat, 16 Apr 2011 06:17:26 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 36401431FB5 for ; Sat, 16 Apr 2011 06:17:26 -0700 (PDT) Received: by wyi11 with SMTP id 11so3978263wyi.26 for ; Sat, 16 Apr 2011 06:17:25 -0700 (PDT) Received: by 10.216.121.200 with SMTP id r50mr539565weh.7.1302959844864; Sat, 16 Apr 2011 06:17:24 -0700 (PDT) Received: from localhost (99.28-240-81.adsl-dyn.isp.belgacom.be [81.240.28.99]) by mx.google.com with ESMTPS id t72sm1735074wei.44.2011.04.16.06.17.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 16 Apr 2011 06:17:24 -0700 (PDT) From: Pieter Praet To: notmuch@notmuchmail.org Subject: [PATCH] emacs: notmuch-hello: respect notmuch-help's wishes Date: Sat, 16 Apr 2011 15:12:43 +0200 User-Agent: Notmuch/0.5-86-g4875299 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Message-ID: <87ei522v4t.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 16 Apr 2011 13:17:30 -0000 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 --- 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