]> git.earman.xyz Git - emacsinit.git/commitdiff
Changes for time clocking
authorrearman <rearman@r717.net>
Tue, 17 Mar 2026 21:01:29 +0000 (17:01 -0400)
committerrearman <rearman@r717.net>
Tue, 17 Mar 2026 21:01:29 +0000 (17:01 -0400)
Give it a sane setup, and some better key bindings.  Also set up some keyword
faces and better agenda file finding.

re/re-org.el
re/re-packages.el

index 3b661253e639dce665cdef1e5a59771088319362..8e55029cbc795fe53f61eb944401a15e6e5faee7 100644 (file)
       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)))
+\f
+;; 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))
+
 \f
 ;; 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)
       '(("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
index 199ae15f6f6985bc41ab101c15ced142336b8333..e8388abb653672f89ab621712172fa2a5dfd67b3 100644 (file)
    ("C-c a" . org-agenda)
    ("C-c c" . org-capture)
    ("C-c b" . org-switchb)
+   ("<f10>" . org-clock-out)
+   ("<f2>" . org-clock-goto)
    :map org-mode-map
    ("M-<right>" . org-shiftmetaright)
    ("M-<left>" . org-shiftmetaleft)
    ("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)
+   ("<f9>" . org-clock-in)))
 
 (use-package howm
   :config