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 6457B431FC4
\r
6 for <notmuch@notmuchmail.org>; Fri, 21 Feb 2014 15:20:52 -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 QICbreNdWKuZ for <notmuch@notmuchmail.org>;
\r
16 Fri, 21 Feb 2014 15:20:50 -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 94568431FBF
\r
19 for <notmuch@notmuchmail.org>; Fri, 21 Feb 2014 15:20:48 -0800 (PST)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 176F110019C; Sat, 22 Feb 2014 01:20:40 +0200 (EET)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 3/3] emacs: defun notmuch-hello-versions and bind 'v' in hello
\r
26 Date: Sat, 22 Feb 2014 01:20:37 +0200
\r
27 Message-Id: <1393024837-30394-3-git-send-email-tomi.ollila@iki.fi>
\r
28 X-Mailer: git-send-email 1.8.0
\r
29 In-Reply-To: <1393024837-30394-1-git-send-email-tomi.ollila@iki.fi>
\r
30 References: <1393024837-30394-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: Fri, 21 Feb 2014 23:20:52 -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 | 15 +++++++++++++--
\r
51 1 file changed, 13 insertions(+), 2 deletions(-)
\r
53 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
54 index 7b3d76b..f5e7268 100644
\r
55 --- a/emacs/notmuch-hello.el
\r
56 +++ b/emacs/notmuch-hello.el
\r
57 @@ -513,6 +513,18 @@ 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 +;; the following variable is defined as being defconst in notmuch.el
\r
62 +(defvar notmuch-emacs-version)
\r
64 +(defun notmuch-hello-versions ()
\r
65 + "Display the notmuch version(s)"
\r
67 + (let ((notmuch-cli-version (notmuch-version)))
\r
68 + (message "notmuch version %s"
\r
69 + (if (string= notmuch-emacs-version notmuch-cli-version)
\r
70 + notmuch-cli-version
\r
71 + (concat notmuch-cli-version
\r
72 + " (emacs mua version " notmuch-emacs-version ")")))))
\r
74 (defvar notmuch-hello-mode-map
\r
75 (let ((map (if (fboundp 'make-composed-keymap)
\r
76 @@ -523,8 +535,7 @@ Such a list can be computed with `notmuch-hello-query-counts'."
\r
77 ;; it's unlikely to change.
\r
78 (copy-keymap widget-keymap))))
\r
79 (set-keymap-parent map notmuch-common-keymap)
\r
80 - (define-key map "v" (lambda () "Display the notmuch version" (interactive)
\r
81 - (message "notmuch version %s" (notmuch-version))))
\r
82 + (define-key map "v" 'notmuch-hello-versions)
\r
83 (define-key map (kbd "<C-tab>") 'widget-backward)
\r
85 "Keymap for \"notmuch hello\" buffers.")
\r