New "notmuch address" command
[notmuch-archives.git] / c3 / 4a6e416f77fc57e6556c2c708304623a0bc72a
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 1205D431FC0\r
6         for <notmuch@notmuchmail.org>; Fri, 21 Feb 2014 15:20:50 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 WJPLVM8kKjh6 for <notmuch@notmuchmail.org>;\r
16         Fri, 21 Feb 2014 15:20:46 -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 9B6E8431FBC\r
19         for <notmuch@notmuchmail.org>; Fri, 21 Feb 2014 15:20:46 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 975381000CA; Sat, 22 Feb 2014 01:20:39 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH 2/3] emacs: defconst notmuch-emacs-version to a value during\r
25         byte compilation\r
26 Date: Sat, 22 Feb 2014 01:20:36 +0200\r
27 Message-Id: <1393024837-30394-2-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
34 Precedence: list\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:50 -0000\r
45 \r
46 The notmuch cli program and emacs lisp versions may differ. For now\r
47 we can help users with their emacs client problems better if we can\r
48 ask what version of emacs MUA they are running. In the future we can\r
49 put the emacs MUA version to User-Agent: string in outgoing mail.\r
50 ---\r
51  emacs/Makefile.local | 6 +++++-\r
52  emacs/notmuch.el     | 7 +++++++\r
53  2 files changed, 12 insertions(+), 1 deletion(-)\r
54 \r
55 diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
56 index 42bfbd9..e78699e 100644\r
57 --- a/emacs/Makefile.local\r
58 +++ b/emacs/Makefile.local\r
59 @@ -24,6 +24,8 @@ emacs_images := \\r
60  \r
61  emacs_bytecode = $(emacs_sources:.el=.elc)\r
62  \r
63 +$(dir)/notmuch.elc: version.stamp\r
64 +\r
65  # Because of defmacro's and defsubst's, we have to account for load\r
66  # dependencies between Elisp files when byte compiling.  Otherwise,\r
67  # the byte compiler may load an old .elc file when processing a\r
68 @@ -40,7 +42,9 @@ CLEAN+=$(dir)/.eldeps $(dir)/.eldeps.tmp\r
69  \r
70  ifeq ($(HAVE_EMACS),1)\r
71  %.elc: %.el $(global_deps)\r
72 -       $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $<\r
73 +       $(call quiet,EMACS) --directory emacs \\r
74 +               --eval "(setq notmuch--version \"$(VERSION)\")" \\r
75 +               -batch -f batch-byte-compile $<\r
76  endif\r
77  \r
78  ifeq ($(WITH_EMACS),1)\r
79 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
80 index 0471750..1b15054 100644\r
81 --- a/emacs/notmuch.el\r
82 +++ b/emacs/notmuch.el\r
83 @@ -81,6 +81,13 @@ To enter a line break in customize, press \\[quoted-insert] C-j."\r
84    :type '(alist :key-type (string) :value-type (string))\r
85    :group 'notmuch-search)\r
86  \r
87 +;; defconst notmuch-version to a value during build-time byte compilation...\r
88 +(defconst notmuch-emacs-version\r
89 +  (eval-when-compile (if (boundp 'notmuch--version)\r
90 +                        notmuch--version\r
91 +                      "unknown"))\r
92 +  "Version string of this version of Notmuch Emacs MUA.")\r
93 +\r
94  (defvar notmuch-query-history nil\r
95    "Variable to store minibuffer history for notmuch queries")\r
96  \r
97 -- \r
98 1.8.0\r
99 \r