* mm-send.el: remove <> from message ids when flagging them

This commit is contained in:
Dirk-Jan C. Binnema
2011-10-03 09:13:58 +03:00
parent 1385969d22
commit a02464d307

View File

@ -378,6 +378,7 @@ using Gnus' `message-mode'."
(setq buffer-read-only t))) (setq buffer-read-only t)))
(defun mm/send-set-parent-flag () (defun mm/send-set-parent-flag ()
"Set the 'replied' flag on messages we replied to, and the "Set the 'replied' flag on messages we replied to, and the
'passed' flag on message we have forwarded. 'passed' flag on message we have forwarded.
@ -406,13 +407,15 @@ This is meant to be called from message mode's
(let ((refs)) (let ((refs))
(while (re-search-forward "<[^ <]+@[^ <]+>" nil t) (while (re-search-forward "<[^ <]+@[^ <]+>" nil t)
(push (match-string 0) refs)) (push (match-string 0) refs))
(setq forwarded-from (last refs)) (setq forwarded-from (last refs))))))
(message "refs: %S, forwarded-from %S" refs forwarded-from)))))
;; remove the <>
(when (and in-reply-to (string-match "<\\(.*\\)>" in-reply-to))
(mm/proc-flag (match-string 1 in-reply-to) "+R"))
(when (and forwarded-from (string-match "<\\(.*\\)>" forwarded-from))
(mm/proc-flag (match-string 1 forwarded-from) "+P"))))
(when in-reply-to
(mm/proc-flag in-reply-to "+R"))
(when forwarded-from
(mm/proc-flag forwarded-from "+P"))))
(provide 'mm-send) (provide 'mm-send)