diff options
-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 |