aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-email.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/git-email.el b/git-email.el
index 1897bcd..152b113 100644
--- a/git-email.el
+++ b/git-email.el
@@ -54,16 +54,23 @@
(point-max))))
(defun git-email-send-email (patch-file)
- "Given a PATCH-FILE, send an email."
+ "Given a PATCH-FILE, send an email.
+Extracts the relevant headers and the diff from the PATCH-FILE and inserts
+them into the message buffer."
(interactive)
(let ((subject (git-email--extract-header "subject" patch-file))
(from (git-email--extract-header "from" patch-file))
(in-reply-to (git-email--extract-header "in-reply-to" patch-file))
- (msg-id (git-email--extract-header "message-id" patch-file)))
+ (msg-id (git-email--extract-header "message-id" patch-file))
+ (diff (git-email--extract-diff patch-file)))
(funcall git-email--compose-message-function "test" subject
`(("in-reply-to" ,in-reply-to)
("message-id" ,msg-id)
- ("from" ,from)))))
+ ("from" ,from)))
+ ;; (let ((body (or (re-search-forward "<#part .*>")
+ ;; (re-search-forward "--text follows this line--"))))
+ (goto-char (point-max))
+ (insert diff)))
(provide 'git-email)