diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-05 12:02:40 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-05 12:02:40 -0400 |
commit | 193f6d72f4041dd7121ccc4a1e4895aa0f2a52e1 (patch) | |
tree | 6351f5f8e4216b694614cfec97feeef7c8d907f7 | |
parent | f6016436257242a83355b7d710451c62164d6dfc (diff) | |
download | emacsconf-el-193f6d72f4041dd7121ccc4a1e4895aa0f2a52e1.tar.xz emacsconf-el-193f6d72f4041dd7121ccc4a1e4895aa0f2a52e1.zip |
Add emacsconf-validate-talk-subtree
Diffstat (limited to '')
-rw-r--r-- | emacsconf.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/emacsconf.el b/emacsconf.el index 6d0e5ae..81caa56 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -753,6 +753,17 @@ Include some other things, too, such as emacsconf-year, title, name, email, url, "Remove CANCELLED talks from the list." (seq-remove (lambda (o) (string= (plist-get o :status) "CANCELLED")) list)) +(defun emacsconf-validate-talk-subtree () + "Report an error if required properties are missing." + (interactive) + (let* ((props (org-entry-properties)) + (missing (seq-remove + (lambda (o) (assoc-default (symbol-name o) props)) + '(CUSTOM_ID SLUG NAME NAME_SHORT EMAIL AVAILABILITY Q_AND_A TRACK MAX_TIME)))) + (when missing + (if (called-interactively-p 'any) + (message "Missing %s" (mapconcat #'symbol-name missing ", ")) + (format "Missing %s" (mapconcat #'symbol-name missing ", ")))))) (provide 'emacsconf) ;;; emacsconf.el ends here |