- changed regex
- it now works if there is no clock running

(defun change-todo-state-on-old-clock ()
; old-clock needs state changed if STARTED
(save-excursion
(progn
    (when (marker-buffer org-clock-marker)
(set-buffer (marker-buffer org-clock-marker))
(goto-char (point-min))
(when  (re-search-forward "^\*+ STARTED" nil t)
        (org-todo "WAITING"))))))



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to