diff options
author | Arun Isaac | 2024-06-17 19:56:32 +0100 |
---|---|---|
committer | Arun Isaac | 2024-06-17 19:56:32 +0100 |
commit | 4bb577f26b112ef6f5ed1171dee831bae33bb4c9 (patch) | |
tree | 7c1fb40f2bbc61852aad1e8247b7b19b5d7155b7 | |
parent | 6d37469f1a8a51fee47772d490d2605902221558 (diff) | |
download | varuga-4bb577f26b112ef6f5ed1171dee831bae33bb4c9.tar.gz varuga-4bb577f26b112ef6f5ed1171dee831bae33bb4c9.tar.lz varuga-4bb577f26b112ef6f5ed1171dee831bae33bb4c9.zip |
Fill Subject header only if it is blank.
* varuga.el (varuga-invite): Fill Subject header only if it is blank.
-rw-r--r-- | varuga.el | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -138,14 +138,15 @@ is the length of the event in minutes." (org-duration-to-minutes (read-string "Duration: ")))) (save-excursion - ;; Fill Subject header. - (save-restriction - (message-narrow-to-headers) - (re-search-forward "^Subject:") - (message-narrow-to-field) - (end-of-line) - ;; TODO: Allow customization of the Subject format. - (insert (format "Invitation: %s" summary))) + ;; Fill Subject header if it is blank. + (when (string-blank-p (message-fetch-field "Subject")) + (save-restriction + (message-narrow-to-headers) + (re-search-forward "^Subject:") + (message-narrow-to-field) + (end-of-line) + ;; TODO: Allow customization of the Subject format. + (insert (format "Invitation: %s" summary)))) ;; Fill email body. (goto-char (point-max)) (insert "<#multipart type=mixed>\n") |