[PATCH] emacs: make citation function customizable.
Todd
todd at electricoding.com
Wed Jan 14 15:56:40 PST 2015
Looks good to me. I applied the patch and it works fine as well.
- Todd
>>>>> "DB" == David Bremner <david at tethera.net> writes:
DB> Make a new customizable variable instead of relying on
DB> message-cite-function because the default for the latter changed
DB> between emacs releases.
DB> The defcustom is borrowed from the message.el source, with minor
DB> modifications.
DB> ---
DB> Thanks to Todd for tracking down the wibbly wobbly timey wimey behaviour of this variable. I propose to add our own variable to avoid surprising notmuch-emacs users.
DB> emacs/notmuch-mua.el | 23 ++++++++++++++++++++---
DB> 1 file changed, 20 insertions(+), 3 deletions(-)
DB> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
DB> index 2c58886..33f1399 100644
DB> --- a/emacs/notmuch-mua.el
DB> +++ b/emacs/notmuch-mua.el
DB> @@ -75,6 +75,22 @@ list."
DB> :type '(repeat string)
DB> :group 'notmuch-send)
DB> +(defgroup notmuch-reply nil
DB> + "Replying to messages in notmuch"
DB> + :group 'notmuch)
DB> +
DB> +(defcustom notmuch-mua-cite-function 'message-cite-original
DB> + "*Function for citing an original message.
DB> +Predefined functions include `message-cite-original' and
DB> +`message-cite-original-without-signature'.
DB> +Note that these functions use `mail-citation-hook' if that is non-nil."
DB> + :type '(radio (function-item message-cite-original)
DB> + (function-item message-cite-original-without-signature)
DB> + (function-item sc-cite-original)
DB> + (function :tag "Other"))
DB> + :link '(custom-manual "(message)Insertion Variables")
DB> + :group 'notmuch-reply)
DB> +
DB> ;;
DB> (defun notmuch-mua-get-switch-function ()
DB> @@ -220,8 +236,9 @@ list."
DB> (date (plist-get original-headers :Date))
DB> (start (point)))
DB> - ;; message-cite-original constructs a citation line based on the >From and Date
DB> - ;; headers of the original message, which are assumed to be in the buffer.
DB> + ;; notmuch-mua-cite-function constructs a citation line based
DB> + ;; on the From and Date headers of the original message, which
DB> + ;; are assumed to be in the buffer.
DB> (insert "From: " from "\n")
DB> (insert "Date: " date "\n\n")
DB> @@ -233,7 +250,7 @@ list."
DB> (set-mark (point))
DB> (goto-char start)
DB> ;; Quote the original message according to the user's configured style.
DB> - (message-cite-original)))
DB> + (funcall notmuch-mua-cite-function)))
DB> ;; Crypto processing based crypto content of the original message
DB> (when process-crypto
DB> --
DB> 2.1.4
DB> _______________________________________________
DB> notmuch mailing list
DB> notmuch at notmuchmail.org
DB> http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150114/4587ed23/attachment.pgp>
More information about the notmuch
mailing list