From: rearman Date: Tue, 17 Mar 2026 21:01:29 +0000 (-0400) Subject: Changes for time clocking X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=6ecbd6ac9668f1158afd441c2d7f2e3e033d7b67;p=emacsinit.git Changes for time clocking Give it a sane setup, and some better key bindings. Also set up some keyword faces and better agenda file finding. --- diff --git a/re/re-org.el b/re/re-org.el index 3b66125..8e55029 100644 --- a/re/re-org.el +++ b/re/re-org.el @@ -31,12 +31,24 @@ org-yank-adjusted-subtrees t) (add-hook 'org-agenda-mode-hook #'hl-line-mode) + +(setq org-todo-keyword-faces '(("WAITING" :foreground "orange" :weight bold) + ("UNDERTAKEN" :foreground "magenta" :weight bold) + ("MEETING" :foreground "blue" :weight bold))) + +;; Time Clocking +(org-clock-persistence-insinuate) +(setq org-clock-history-length 10 + org-clock-in-resume t + org-clock-out-remove-zero-time-clocks t + org-clock-persist t + org-clock-persist-query-resume nil + org-clock-report-include-clocking-task t + org-time-stamp-rounding-minutes '(1 1)) + ;; Agenda and capture -(setq org-agenda-files '("~/org/inbox.org" - "~/org/undertakings.org" - "~/org/next.org" - "~/org/meetings.org")) +(setq org-agenda-files '("~/org/")) ;; Allow 9 levels in current file, any other org file, allow toplevel refile, and allow creation of new parents (setq org-refile-targets '((nil :maxlevel . 9) @@ -112,19 +124,33 @@ '(("i" "Inbox" entry (file "inbox.org") "* %^{Description}\nAdded: %U\n%?" - :empty-lines-before 1) + :empty-lines-before 1 + :clock-in t + :clock-resume t) ("n" "Next Item" entry (file "next.org") "* TODO %^{Description} %^{tags}G\nAdded: %U\n%?" - :empty-lines-before 1) + :empty-lines-before 1 + :clock-in t + :clock-resume t) ("u" "Undertake" entry (file "undertakings.org") "* UNDERTAKEN %^{Description}\nAdded: %U\n%?" - :empty-lines-before 1) + :empty-lines-before 1 + :clock-in t + :clock-resume t) ("m" "Meeting" entry (file "agenda.org") "* %^{Description}\n%^{Scheduled:}T\n%?" - :empty-lines-before 1))) + :empty-lines-before 1 + :clock-in t + :clock-resume t) + ("p" "Phone Call" entry + (file "inbox.org") + "* %^{Description} :call:\nAdded: %U\n%?" + :empty-lines-before 1 + :clock-in t + :clock-resume t))) (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id org-id-method 'ts diff --git a/re/re-packages.el b/re/re-packages.el index 199ae15..e8388ab 100644 --- a/re/re-packages.el +++ b/re/re-packages.el @@ -121,6 +121,8 @@ ("C-c a" . org-agenda) ("C-c c" . org-capture) ("C-c b" . org-switchb) + ("" . org-clock-out) + ("" . org-clock-goto) :map org-mode-map ("M-" . org-shiftmetaright) ("M-" . org-shiftmetaleft) @@ -132,7 +134,8 @@ ("C-M-b" . org-backward-heading-same-level) ("C-M-f" . org-forward-heading-same-level) ("C-M-p" . org-previous-visible-heading) - ("C-M-n" . org-next-visible-heading))) + ("C-M-n" . org-next-visible-heading) + ("" . org-clock-in))) (use-package howm :config