From 49a3ce51b13b09804166e021dc8ce8cbaa2e3dbc Mon Sep 17 00:00:00 2001 From: BardofSprites <89086143+BardofSprites@users.noreply.github.com> Date: Fri, 4 Apr 2025 11:20:11 -0400 Subject: auto clock in when starting task --- bard-elisp/bard-calendar.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bard-elisp/bard-calendar.el') diff --git a/bard-elisp/bard-calendar.el b/bard-elisp/bard-calendar.el index 1e3cdb2..b32b9db 100644 --- a/bard-elisp/bard-calendar.el +++ b/bard-elisp/bard-calendar.el @@ -1,5 +1,18 @@ +(require 'org) + ;; Org Clock +(defun bard/auto-clock-in () + "Automatically clock in when task marked in progress (INPROG)." + (when (equal (org-get-todo-state) "INPROG") + (org-clock-in)) + (when (equal (org-get-todo-state) "DONE") + (org-clock-out))) + +(defun test-func () + (interactive) + (message (org-get-todo-state))) + (defun bard/org-clock-report () (interactive) (bard/new-org-buffer) -- cgit v1.2.3