]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-mua.el
emacs: prefer notmuch-emacs-version in User-Agent: header
[notmuch] / emacs / notmuch-mua.el
index 934f6c95e8d4ec5c68fff40e1fac2c1b5ed42da9..3e52d5e2979f8995c33aa2b0b5b4763c536414df 100644 (file)
@@ -118,7 +118,10 @@ Note that these functions use `mail-citation-hook' if that is non-nil."
 
 (defun notmuch-mua-user-agent-notmuch ()
   "Generate a `User-Agent:' string suitable for notmuch."
-  (concat "Notmuch/" (notmuch-cli-version) " (http://notmuchmail.org)"))
+  (let ((notmuch-version (if (string= notmuch-emacs-version "unknown")
+                            (notmuch-cli-version)
+                          notmuch-emacs-version)))
+    (concat "Notmuch/" notmuch-version " (http://notmuchmail.org)")))
 
 (defun notmuch-mua-user-agent-emacs ()
   "Generate a `User-Agent:' string suitable for notmuch."