X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=3e52d5e2979f8995c33aa2b0b5b4763c536414df;hb=e2fb06d369bf7a532b4438ab576ca2969a8882a3;hp=2c5888600b6c6d2af795b39302d061935cf7aa0b;hpb=f5db7ad7d243785c274a99734c681e69d13313d0;p=notmuch diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c588860..3e52d5e2 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -75,6 +75,22 @@ list." :type '(repeat string) :group 'notmuch-send) +(defgroup notmuch-reply nil + "Replying to messages in notmuch" + :group 'notmuch) + +(defcustom notmuch-mua-cite-function 'message-cite-original + "*Function for citing an original message. +Predefined functions include `message-cite-original' and +`message-cite-original-without-signature'. +Note that these functions use `mail-citation-hook' if that is non-nil." + :type '(radio (function-item message-cite-original) + (function-item message-cite-original-without-signature) + (function-item sc-cite-original) + (function :tag "Other")) + :link '(custom-manual "(message)Insertion Variables") + :group 'notmuch-reply) + ;; (defun notmuch-mua-get-switch-function () @@ -102,7 +118,10 @@ list." (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." @@ -220,8 +239,9 @@ list." (date (plist-get original-headers :Date)) (start (point))) - ;; message-cite-original constructs a citation line based on the From and Date - ;; headers of the original message, which are assumed to be in the buffer. + ;; notmuch-mua-cite-function constructs a citation line based + ;; on the From and Date headers of the original message, which + ;; are assumed to be in the buffer. (insert "From: " from "\n") (insert "Date: " date "\n\n") @@ -233,7 +253,7 @@ list." (set-mark (point)) (goto-char start) ;; Quote the original message according to the user's configured style. - (message-cite-original))) + (funcall notmuch-mua-cite-function))) ;; Crypto processing based crypto content of the original message (when process-crypto