diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-11-14 10:33:06 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-11-14 10:33:06 -0500 |
commit | 0608ece50bc7b01f2118cca903a78db6f2ac026e (patch) | |
tree | 78234fab971245e79f9025b4e235dffaeaa83a17 /emacsconf-mail.el | |
parent | 36b01a7223c568f00352f7fb8cc33684952c842c (diff) | |
download | emacsconf-el-0608ece50bc7b01f2118cca903a78db6f2ac026e.tar.xz emacsconf-el-0608ece50bc7b01f2118cca903a78db6f2ac026e.zip |
templates, intro pad, transcripts
Diffstat (limited to 'emacsconf-mail.el')
-rw-r--r-- | emacsconf-mail.el | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/emacsconf-mail.el b/emacsconf-mail.el index 9bd8dcb..21e22e9 100644 --- a/emacsconf-mail.el +++ b/emacsconf-mail.el @@ -159,9 +159,12 @@ :reply-to (or (org-entry-get-with-inheritance "REPLY_TO") (org-entry-get-with-inheritance "REPLY-TO")) :mail-followup-to (or (org-entry-get-with-inheritance "MAIL_FOLLOWUP_TO") (org-entry-get-with-inheritance "MAIL-FOLLOWUP-TO")) - :body (replace-regexp-in-string "\n *," "\n" (buffer-substring-no-properties - (progn (org-end-of-meta-data) (point)) - (org-end-of-subtree))) + :body (replace-regexp-in-string "\n *," "\n" + (buffer-substring-no-properties + (progn + (org-back-to-heading) + (org-end-of-meta-data) (point)) + (org-end-of-subtree))) :function (when (org-entry-get-with-inheritance "FUNCTION") (intern (org-entry-get-with-inheritance "FUNCTION"))))) @@ -178,7 +181,14 @@ (progn (goto-char char) (emacsconf-mail-merge-get-template-from-subtree)) - (error "Could not find template %s" id))))))) + ;; Try the conf.org file + (with-current-buffer (find-file-noselect emacsconf-org-file) + (setq char (org-find-property "EMAIL_ID" id)) + (if char + (progn + (goto-char char) + (emacsconf-mail-merge-get-template-from-subtree)) + (error "Could not find template %s" id))))))))) (defun emacsconf-mail-merge-fill (string) "Fill in the values for STRING using the properties at point. |