From 6f2da20a2d783ec4fa92608ffb5e6b471b13f8d6 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 11 Nov 2022 19:43:20 -0500 Subject: Updating status --- emacsconf.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'emacsconf.el') diff --git a/emacsconf.el b/emacsconf.el index d7a75fe..c16f657 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -1113,6 +1113,12 @@ Filter by TRACK if given. Use INFO as the list of talks." (recenter) (undo-boundary))))) +(defmacro emacsconf-with-todo-hooks (&rest body) + "Run BODY with the Emacsconf todo hooks." + `(with-current-buffer (find-file-noselect emacsconf-org-file) + (let ((org-after-todo-state-change-hook '(emacsconf-org-after-todo-state-change))) + ,@body))) + (defun emacsconf-add-org-after-todo-state-change-hook () "Add FUNC to `org-after-todo-stage-change-hook'." (interactive) @@ -1174,7 +1180,8 @@ tracks with the ID in the cdr of that list." (interactive (list (emacsconf-complete-talk) "." (completing-read "To: " (mapcar 'car emacsconf-status-types)))) (emacsconf-with-talk-heading slug (when (string-match from-states (org-entry-get (point) "TODO")) - (org-todo to-state)))) + (org-todo to-state) + (save-buffer)))) ;; copied from org-ascii--indent-string (defun emacsconf-indent-string (s width) -- cgit v1.2.3