summaryrefslogtreecommitdiffstats
path: root/emacsconf-mail.el
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-11-19 16:02:53 -0500
committerSacha Chua <sacha@sachachua.com>2023-11-19 16:02:53 -0500
commit1fc1c7e45b32421e17fcec1b23327bfb264a3fab (patch)
tree24dd9452f93ceb3dd19f89f81d4968162b87aba9 /emacsconf-mail.el
parent0fa05d446121d582574988cd7cdc89a18bd3603b (diff)
downloademacsconf-el-1fc1c7e45b32421e17fcec1b23327bfb264a3fab.tar.xz
emacsconf-el-1fc1c7e45b32421e17fcec1b23327bfb264a3fab.zip
New function emacsconf-mail-merge-check-drafts
Diffstat (limited to 'emacsconf-mail.el')
-rw-r--r--emacsconf-mail.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/emacsconf-mail.el b/emacsconf-mail.el
index 0546a1e..1656bef 100644
--- a/emacsconf-mail.el
+++ b/emacsconf-mail.el
@@ -507,6 +507,21 @@ Include some other things, too, such as emacsconf-year, title, name, email, url,
(when note (insert "#+NOTE: " note "\n======== Delete above before sending =============\n\n"))
(insert body))))
+(defun emacsconf-mail-merge-check-drafts ()
+ "Put all the drafts in one buffer to check."
+ (interactive)
+ (let (result)
+ (mapc (lambda (buffer)
+ (when (string-match "unsent" (buffer-name buffer))
+ (with-current-buffer buffer
+ (add-to-list 'result (buffer-string)))))
+ (buffer-list))
+ (with-current-buffer (get-buffer-create "*Drafts*")
+ (erase-buffer)
+ (insert (string-join result "\n-------------------------------------------------------\n"))
+ (goto-char (point-min))
+ (switch-to-buffer (current-buffer)))))
+
(defun emacsconf-mail-merge-cancel ()
(interactive)
(mapc (lambda (buffer)