summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-09-20 09:43:30 -0400
committerSacha Chua <sacha@sachachua.com>2023-09-20 09:43:30 -0400
commit0d6e9a550a539ea21bd3370aec113fdc3329e7fd (patch)
treedb25002408d33918d3f1e9504c7004b3a280541d
parentb684768dc24263b1636a18c9c88d52884c317821 (diff)
downloademacsconf-el-0d6e9a550a539ea21bd3370aec113fdc3329e7fd.tar.xz
emacsconf-el-0d6e9a550a539ea21bd3370aec113fdc3329e7fd.zip
add info to mail
-rw-r--r--emacsconf-mail.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/emacsconf-mail.el b/emacsconf-mail.el
index ff65868..0c833f6 100644
--- a/emacsconf-mail.el
+++ b/emacsconf-mail.el
@@ -510,5 +510,24 @@ Include some other things, too, such as emacsconf-year, title, name, email, url,
(let ((email (if (string-match "<\\(.*?\\)>" volunteer) (match-string 1) volunteer)))
(notmuch-search (format "from:%s or to:%s" email email))))
+(defun emacsconf-mail-check-for-zzz-before-sending ()
+ "Throw an error if the ZZZ todo marker is still in the message.
+Good for adding to `message-send-hook'."
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward "ZZZ" nil t)
+ (unless (yes-or-no-p "ZZZ marker found. Send anyway? ")
+ (error "ZZZ marker found.")))))
+
+(defun emacsconf-mail-insert-info (talk)
+ "Insert mail info for TALK for easy reference.
+This includes NAME_SHORT and EMAIL_NOTES."
+ (interactive (list (emacsconf-complete-talk-info)))
+ (setq talk (emacsconf-resolve-talk talk))
+ (let ((info (concat (emacsconf-surround "Hi, " (plist-get talk :speakers-short) "!\n\n" "")
+ (emacsconf-surround "--- ZZZ ---\n" (plist-get talk :email-notes) "\n------\n\n" ""))))
+ (unless (string= info "")
+ (save-excursion (insert info)))))
+
(provide 'emacsconf-mail)
;;; emacsconf-mail.el ends here