diff options
| author | Sacha Chua <sacha@sachachua.com> | 2026-11-04 09:29:27 -0500 |
|---|---|---|
| committer | Sacha Chua <sacha@sachachua.com> | 2026-11-04 09:29:27 -0500 |
| commit | aef4fb64daaf6fd2a0c84cd70abeeda866b8e5f5 (patch) | |
| tree | 23881e2a8869794f1d8253013f4b6afe65178149 | |
| parent | c673b2e2b9ab73ae6bb4adc2308a39a6e8078817 (diff) | |
| download | emacsconf-el-aef4fb64daaf6fd2a0c84cd70abeeda866b8e5f5.tar.xz emacsconf-el-aef4fb64daaf6fd2a0c84cd70abeeda866b8e5f5.zip | |
handle functions in log-note
Diffstat (limited to '')
| -rw-r--r-- | emacsconf.el | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/emacsconf.el b/emacsconf.el index c5a812e..f57d2f9 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -1847,7 +1847,10 @@ tracks with the ID in the cdr of that list." (save-window-excursion (save-excursion (emacsconf-with-talk-heading talk - (emacsconf-add-to-logbook note) + (emacsconf-add-to-logbook + (if (functionp note) + (funcall note) + note)) (bury-buffer (current-buffer)))))) (defun emacsconf-reload () @@ -2076,23 +2079,35 @@ With a prefix argument (\\[universal-argument]), open this year's notebook." (defun emacsconf-rescheduled-talks (&optional info) "See `emacsconf-schedule-save-emailed-times' and `emacsconf-mail-schedule-updates'." - (seq-filter - (lambda (o) - (and (plist-get o :email) - (plist-get o :qa-type) - (not (string= (plist-get o :emailed-schedule) - (replace-regexp-in-string "[<>]" "" (plist-get o :scheduled)))) - (not (string= (plist-get o :qa-type) "none")) - (not (= (emacsconf-schedule-difference-from-emailed o) 0)))) - (emacsconf-publish-prepare-for-display (emacsconf-filter-talks (or info (emacsconf-get-talk-info)))))) - -(defun emacsconf-schedule-difference-from-emailed (talk) - "Return the number of minutes. Negative means earlier." - (let ((start (plist-get talk :start-time)) - (emailed (org-timestamp-to-time (org-timestamp-split-range - (org-timestamp-from-string - (format "<%s>" (plist-get talk :emailed-schedule))))))) - (round (/ (float-time (time-subtract start emailed)) 60.0)))) + (interactive) + (let ((rescheduled + (seq-filter + (lambda (o) + (and (plist-get o :email) + (plist-get o :qa-type) + (not (string= (plist-get o :emailed-schedule) + (replace-regexp-in-string "[<>]" "" (plist-get o :scheduled)))) + (not (string= (plist-get o :qa-type) "none")) + (not (= (emacsconf-schedule-difference-from-emailed o) 0)))) + (emacsconf-publish-prepare-for-display (emacsconf-filter-talks (or info (emacsconf-get-talk-info))))))) + (when (called-interactively-p 'any) + (if rescheduled + (message + "%s" + (mapconcat + #'emacsconf-schedule-format-difference + rescheduled + ", ")) + (message "Up to date."))) + rescheduled)) + +(defun emacsconf-slugs (&optional info) + "Display the slugs of INFO." + (message + "%s" + (mapconcat + (lambda (o) (plist-get o :slug)) (or info (emacsconf-get-talk-info)) + ", "))) (provide 'emacsconf) ;;; emacsconf.el ends here |
