1 Return-Path: <too@guru-group.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B1DCD431FC0
\r
6 for <notmuch@notmuchmail.org>; Sun, 19 Jan 2014 04:52:03 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id c-q6E-hTQnGe for <notmuch@notmuchmail.org>;
\r
16 Sun, 19 Jan 2014 04:51:57 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 6269B431FC2
\r
19 for <notmuch@notmuchmail.org>; Sun, 19 Jan 2014 04:51:57 -0800 (PST)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id AABD71000C1; Sun, 19 Jan 2014 14:51:49 +0200 (EET)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 2/2] emacs: defun notmuch-hello-versions and bind 'v' in hello
\r
26 Date: Sun, 19 Jan 2014 14:51:43 +0200
\r
27 Message-Id: <1390135903-28167-2-git-send-email-tomi.ollila@iki.fi>
\r
28 X-Mailer: git-send-email 1.8.0
\r
29 In-Reply-To: <1390135903-28167-1-git-send-email-tomi.ollila@iki.fi>
\r
30 References: <1390135903-28167-1-git-send-email-tomi.ollila@iki.fi>
\r
31 Cc: tomi.ollila@iki.fi
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.13
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Sun, 19 Jan 2014 12:52:03 -0000
\r
46 If notmuch cli & notmuch emacs MUA versions differ, print also the
\r
47 emacs MUA version string (along with the cli version) to the
\r
50 emacs/notmuch-hello.el | 12 ++++++++++--
\r
51 1 file changed, 10 insertions(+), 2 deletions(-)
\r
53 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
54 index 55c416a..299e35f 100644
\r
55 --- a/emacs/notmuch-hello.el
\r
56 +++ b/emacs/notmuch-hello.el
\r
57 @@ -513,6 +513,15 @@ Such a list can be computed with `notmuch-hello-query-counts'."
\r
58 (remove-hook 'window-configuration-change-hook
\r
59 #'notmuch-hello-window-configuration-change))))
\r
61 +(defun notmuch-hello-versions ()
\r
62 + "Display the notmuch version(s)"
\r
64 + (let ((notmuch-cli-version (notmuch-version)))
\r
65 + (message "notmuch version %s"
\r
66 + (if (string= notmuch-emacs-version notmuch-cli-version)
\r
67 + notmuch-cli-version
\r
68 + (concat notmuch-cli-version
\r
69 + " (Emacs MUA version " notmuch-emacs-version ")")))))
\r
71 (defvar notmuch-hello-mode-map
\r
72 (let ((map (if (fboundp 'make-composed-keymap)
\r
73 @@ -523,8 +532,7 @@ Such a list can be computed with `notmuch-hello-query-counts'."
\r
74 ;; it's unlikely to change.
\r
75 (copy-keymap widget-keymap))))
\r
76 (set-keymap-parent map notmuch-common-keymap)
\r
77 - (define-key map "v" (lambda () "Display the notmuch version" (interactive)
\r
78 - (message "notmuch version %s" (notmuch-version))))
\r
79 + (define-key map "v" 'notmuch-hello-versions)
\r
80 (define-key map (kbd "<C-tab>") 'widget-backward)
\r
82 "Keymap for \"notmuch hello\" buffers.")
\r