aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-02-06 11:24:46 +0100
committerXinglu Chen <public@yoctocell.xyz>2021-02-06 11:24:46 +0100
commit59d673bbf24a94d4cbf2e9b3e2f01896ad0ee244 (patch)
tree2cf2904253558b46aae563016a1a0a81ac405eef
parent20f505fc71c735c3cfebdc06d723af57c53d0ad0 (diff)
git-email-send-all: Sort message buffers
* git-email.el (git-email-send-all): Sort the message buffers so they get sent in the correct order.
-rw-r--r--git-email.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-email.el b/git-email.el
index 2a4addc..01bd65a 100644
--- a/git-email.el
+++ b/git-email.el
@@ -380,7 +380,9 @@ default behavior is to delete them after sending the message."
(defun git-email-send-all ()
"Send all unsent emails."
(interactive)
- (let ((buffers (message-buffers)))
+ ;; Sort the buffers so that [PATCH 0/N] comes first, this prevents
+ ;; the ordering to get messed up.
+ (let ((buffers (sort (message-buffers) #'string-greaterp)))
(mapc (lambda (b) (switch-to-buffer b)
(funcall git-email-send-email-function))
buffers)))