--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 5FCDD6DE140C\r
+ for <notmuch@notmuchmail.org>; Mon, 3 Aug 2015 01:15:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.985\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.985 tagged_above=-999 required=5\r
+ tests=[AWL=-0.415, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+ DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id IEPqPjDWCqDo for <notmuch@notmuchmail.org>;\r
+ Mon, 3 Aug 2015 01:15:28 -0700 (PDT)\r
+Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com\r
+ [209.85.212.169])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id BF5306DE13AB\r
+ for <notmuch@notmuchmail.org>; Mon, 3 Aug 2015 01:15:27 -0700 (PDT)\r
+Received: by wibud3 with SMTP id ud3so102805268wib.0\r
+ for <notmuch@notmuchmail.org>; Mon, 03 Aug 2015 01:15:26 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+ :message-id:mime-version:content-type;\r
+ bh=0Ovn/Y97JaQVQ4x05Mlcc0jMhdizP27iV4xe7ZRpJZk=;\r
+ b=p6cg3re203trcAIIcwU+LA2tOA71bbai4/icZPhC+7UZ/UMrYP/CUrRRfohvbPl1pZ\r
+ /5cYGfl6866SVF6BZ9sVkFsWddPa/g00rPZ5BcPpD7mF0Ge7rAvTH/vnxg8lM4HdNvje\r
+ si4iUqu21BR2YkPpdg1l4X3G9/1PAt5ilQ19kw9VZxEbPlu+haBp+dQBtJGQzBug4YYs\r
+ YcKyWetO3G73+dMmgajKZ6Kv+QKsfkc3ju6sIK74p4wx66vo+SkrlZKeHEVQ9UgEtpiJ\r
+ Vt/hzJzP3k28BQn1V1Jo2fcmBsmlf/L83qP3Owy8SL6pyJLWbVFnsAciXpvywYJrT7v8\r
+ R4Vw==\r
+X-Received: by 10.180.83.101 with SMTP id p5mr30593035wiy.52.1438589726022;\r
+ Mon, 03 Aug 2015 01:15:26 -0700 (PDT)\r
+Received: from localhost (188.29.71.109.threembb.co.uk. [188.29.71.109])\r
+ by smtp.gmail.com with ESMTPSA id fz16sm12282201wic.3.2015.08.03.01.15.24\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Mon, 03 Aug 2015 01:15:25 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org,\r
+ sojkam1@fel.cvut.cz\r
+Subject: Re: [PATCH 2/2] emacs: prefer notmuch-emacs-version in User-Agent:\r
+ header\r
+In-Reply-To: <1438526894-19657-2-git-send-email-tomi.ollila@iki.fi>\r
+References: <1438526894-19657-1-git-send-email-tomi.ollila@iki.fi>\r
+ <1438526894-19657-2-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 03 Aug 2015 09:15:23 +0100\r
+Message-ID: <87zj28wzxg.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 03 Aug 2015 08:15:30 -0000\r
+\r
+\r
+On Sun, 02 Aug 2015, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> Now that we have `notmuch-emacs-version' defined in notmuch emacs MUA\r
+> use that as a part of User-Agent: header to provide more accurate\r
+> version information when sending emails.\r
+>\r
+> In case some incomplete installation of notmuch emacs MUA is used and\r
+> `notmuch-emacs-version' is defined as "unknown" then fall back to ask\r
+> version info from cli (as it used to be before this commit).\r
+>\r
+> Requiring notmuch-version[.elc] and if that is missing setting\r
+> "fallback" notmuch-emacs-version (to "unknown") was moved from\r
+> notmuch.el to notmuch-lib.el as notmuch-mua.el (which provides\r
+> User-Agent: information) require's the latter.\r
+> ---\r
+>\r
+> Note that I did not create notmuch-guess-emacs-version (or something)\r
+> function. The idea is good but there is one HARD problem: naming it.\r
+> Also, I personally suspect that no-one is going to need that function in\r
+> coming years...\r
+\r
+This pair of patches look good to me +1. \r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+>\r
+> emacs/notmuch-lib.el | 4 ++++\r
+> emacs/notmuch-mua.el | 5 ++++-\r
+> emacs/notmuch.el | 4 ----\r
+> 3 files changed, 8 insertions(+), 5 deletions(-)\r
+>\r
+> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+> index e16a1b9..201d7ec 100644\r
+> --- a/emacs/notmuch-lib.el\r
+> +++ b/emacs/notmuch-lib.el\r
+> @@ -25,6 +25,10 @@\r
+> (require 'mm-decode)\r
+> (require 'cl)\r
+> \r
+> +(unless (require 'notmuch-version nil t)\r
+> + (defconst notmuch-emacs-version "unknown"\r
+> + "Placeholder variable when notmuch-version.el[c] is not available."))\r
+> +\r
+> (autoload 'notmuch-jump-search "notmuch-jump"\r
+> "Jump to a saved search by shortcut key." t)\r
+> \r
+> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+> index 934f6c9..3e52d5e 100644\r
+> --- a/emacs/notmuch-mua.el\r
+> +++ b/emacs/notmuch-mua.el\r
+> @@ -118,7 +118,10 @@ (defun notmuch-mua-user-agent-full ()\r
+> \r
+> (defun notmuch-mua-user-agent-notmuch ()\r
+> "Generate a `User-Agent:' string suitable for notmuch."\r
+> - (concat "Notmuch/" (notmuch-cli-version) " (http://notmuchmail.org)"))\r
+> + (let ((notmuch-version (if (string= notmuch-emacs-version "unknown")\r
+> + (notmuch-cli-version)\r
+> + notmuch-emacs-version)))\r
+> + (concat "Notmuch/" notmuch-version " (http://notmuchmail.org)")))\r
+> \r
+> (defun notmuch-mua-user-agent-emacs ()\r
+> "Generate a `User-Agent:' string suitable for notmuch."\r
+> diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+> index 6564816..5284e77 100644\r
+> --- a/emacs/notmuch.el\r
+> +++ b/emacs/notmuch.el\r
+> @@ -61,10 +61,6 @@\r
+> (require 'notmuch-message)\r
+> (require 'notmuch-parser)\r
+> \r
+> -(unless (require 'notmuch-version nil t)\r
+> - (defconst notmuch-emacs-version "unknown"\r
+> - "Placeholder variable when notmuch-version.el[c] is not available."))\r
+> -\r
+> (defcustom notmuch-search-result-format\r
+> `(("date" . "%12s ")\r
+> ("count" . "%-7s ")\r
+> -- \r
+> 1.9.3\r