From 5c6fe21cc9047f00ae9300eba9922c52ce5dd4c8 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 19 Jan 2014 14:51:42 +0200 Subject: [PATCH] [PATCH 1/2] emacs: defconst notmuch-emacs-version to a value during byte compilation --- 92/674c1ce8e7583023dafed44d6b26a3a3ca001e | 88 +++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 92/674c1ce8e7583023dafed44d6b26a3a3ca001e diff --git a/92/674c1ce8e7583023dafed44d6b26a3a3ca001e b/92/674c1ce8e7583023dafed44d6b26a3a3ca001e new file mode 100644 index 000000000..8949fb1fb --- /dev/null +++ b/92/674c1ce8e7583023dafed44d6b26a3a3ca001e @@ -0,0 +1,88 @@ +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 6E039431FC3 + for ; Sun, 19 Jan 2014 04:52:00 -0800 (PST) +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 1xEeYjN0+tXr for ; + Sun, 19 Jan 2014 04:51:55 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 8C7C3431FC0 + for ; Sun, 19 Jan 2014 04:51:55 -0800 (PST) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id D1A681000B3; Sun, 19 Jan 2014 14:51:48 +0200 (EET) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] emacs: defconst notmuch-emacs-version to a value during + byte compilation +Date: Sun, 19 Jan 2014 14:51:42 +0200 +Message-Id: <1390135903-28167-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 1.8.0 +Cc: tomi.ollila@iki.fi +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: Sun, 19 Jan 2014 12:52:00 -0000 + +The notmuch cli program and emacs lisp versions may differ. For now +we can help users with their emacs client problems better if we can +ask what version of emacs MUA they are running. In the future we can +put the emacs MUA version to User-Agent: string in outgoing mail. +--- + emacs/Makefile.local | 4 +++- + emacs/notmuch-lib.el | 7 +++++++ + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/emacs/Makefile.local b/emacs/Makefile.local +index 42bfbd9..1b2db7e 100644 +--- a/emacs/Makefile.local ++++ b/emacs/Makefile.local +@@ -40,7 +40,9 @@ CLEAN+=$(dir)/.eldeps $(dir)/.eldeps.tmp + + ifeq ($(HAVE_EMACS),1) + %.elc: %.el $(global_deps) +- $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $< ++ $(call quiet,EMACS) --directory emacs \ ++ --eval "(setq notmuch--version \"$(VERSION)\")" \ ++ -batch -f batch-byte-compile $< + endif + + ifeq ($(WITH_EMACS),1) +diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +index 2be409b..81eed54 100644 +--- a/emacs/notmuch-lib.el ++++ b/emacs/notmuch-lib.el +@@ -168,6 +168,13 @@ Otherwise the output will be returned" + (notmuch-check-exit-status status (cons notmuch-command args) output) + output))) + ++;; defconst notmuch-emacs-version to a value during build-time byte compilation ++(defconst notmuch-emacs-version ++ (eval-when-compile (if (boundp 'notmuch--version) ++ notmuch--version ++ "not-compiled")) ++ "Version string of this version of Notmuch Emacs MUA.") ++ + (defun notmuch-version () + "Return a string with the notmuch version number." + (let ((long-string +-- +1.8.4.2 + -- 2.26.2