(defun notmuch-mua-user-agent-notmuch ()
"Generate a `User-Agent:' string suitable for notmuch."
- (concat "Notmuch/" (notmuch-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."
(message-goto-body)
(set-buffer-modified-p nil))
+(define-derived-mode notmuch-message-mode message-mode "Notmuch Message"
+ "Notmuch message composition mode. Mostly like `message-mode'")
+
(defun notmuch-mua-mail (&optional to subject other-headers &rest other-args)
"Invoke the notmuch mail composition window.
(notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
(apply #'message-mail to subject other-headers other-args)
+ (notmuch-message-mode)
(message-sort-headers)
(message-hide-headers)
(set-buffer-modified-p nil)