diff options
author | Raúl Benencia <id@rbenencia.name> | 2025-03-29 09:01:23 -0700 |
---|---|---|
committer | Raúl Benencia <id@rbenencia.name> | 2025-03-29 09:01:23 -0700 |
commit | 5ff798f38a2fe8214335c21b47e22f4fa6020bc4 (patch) | |
tree | 44c4f8c4defa79596f97245160b45aa856c25945 | |
parent | fccae385b73b1a744160c8fe53978ff98144c997 (diff) |
-rw-r--r-- | .emacs.d/rul-emacs.org | 42 | ||||
-rw-r--r-- | .emacs.d/rul-lisp/packages/rul-org.el | 2 |
2 files changed, 37 insertions, 7 deletions
diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org index e7162c8..0c029ef 100644 --- a/.emacs.d/rul-emacs.org +++ b/.emacs.d/rul-emacs.org @@ -946,6 +946,11 @@ My org mode configuration is quite big, so I split it across multiple files. (global-set-key (kbd "C-c c") #'org-capture) (global-set-key (kbd "C-c s") #'org-schedule) +(global-set-key (kbd "<f9>") 'bh/punch-in) +(global-set-key (kbd "<f10>") 'bh/punch-out) +(global-set-key (kbd "<f11>") 'org-clock-goto) +(global-set-key (kbd "<f12>") 'org-agenda) + ;; ORG STATES ;; (setq org-todo-keywords (quote ((sequence "TODO(t)" "MAYBE(m)" "NEXT(n)" "|" "DONE(d)") @@ -966,6 +971,7 @@ My org mode configuration is quite big, so I split it across multiple files. (setq org-log-done (quote time)) (setq org-log-redeadline (quote time)) (setq org-log-reschedule (quote time)) +(setq org-log-into-drawer t) ;; CAPTURE ;; (setq org-capture-templates @@ -990,13 +996,12 @@ My org mode configuration is quite big, so I split it across multiple files. ("L" "Web Link" entry (file+headline org-refile-path "Read later") - "* %?[[%:link][%:description]] \"\")\n %:initial\n \nCaptured On: %U" + "* %?[[%:link][%:description]]\n %:initial\n \nCaptured On: %U" ) ("l" "Web Link with Selection" entry (file+headline org-refile-path "Read later") - "* [[%:link][%:description]] \n %:initial\n \nCaptured On: %U") - + "* [[%:link][%:description]]\n %:initial\n \nCaptured On: %U") ))) ;; REFILE ;; @@ -1434,7 +1439,7 @@ as the default task." (when bh/keep-clock-running (bh/clock-in-default-task))))))) -(defvar bh/organization-task-id "eb155a82-92b2-4f25-a3c6-0304591af2f9") +(defvar bh/organization-task-id "redefine") ;; org-id-get-create ;; https://stackoverflow.com/a/10091330 (defun zin/org-agenda-skip-tag (tag &optional others) @@ -1467,6 +1472,34 @@ If OTHERS is true, skip all entries that do not correspond to TAG." (add-hook 'org-clock-out-hook 'bh/clock-out-maybe 'append) +;;; Focusing on current work + +(global-set-key (kbd "<f5>") 'bh/org-todo) +(defun bh/org-todo (arg) + (interactive "p") + (if (equal arg 4) + (save-restriction + (bh/narrow-to-org-subtree) + (org-show-todo-tree nil)) + (bh/narrow-to-org-subtree) + (org-show-todo-tree nil))) + +(global-set-key (kbd "<S-f5>") 'bh/widen) +(defun bh/widen () + (interactive) + (if (equal major-mode 'org-agenda-mode) + (progn + (org-agenda-remove-restriction-lock) + (when org-agenda-sticky + (org-agenda-redo))) + (widen))) + +(defun bh/narrow-to-org-subtree () + (widen) + (org-narrow-to-subtree) + (save-restriction + (org-agenda-set-restriction-lock))) + ;; AGENDA VIEW ;; ;; Do not dim blocked tasks @@ -1533,7 +1566,6 @@ on a single file. ;; Python (use-package blacken :ensure t :defer t) -(add-hook 'python-mode-hook 'py-autopep8-enable-on-save) ;; Terraform (use-package terraform-mode :ensure t :defer t) diff --git a/.emacs.d/rul-lisp/packages/rul-org.el b/.emacs.d/rul-lisp/packages/rul-org.el index d318413..885f48d 100644 --- a/.emacs.d/rul-lisp/packages/rul-org.el +++ b/.emacs.d/rul-lisp/packages/rul-org.el @@ -51,7 +51,6 @@ (global-set-key (kbd "C-c c") #'org-capture) (global-set-key (kbd "C-c s") #'org-schedule) - (global-set-key (kbd "<f9>") 'bh/punch-in) (global-set-key (kbd "<f10>") 'bh/punch-out) (global-set-key (kbd "<f11>") 'org-clock-goto) @@ -108,7 +107,6 @@ ("l" "Web Link with Selection" entry (file+headline org-refile-path "Read later") "* [[%:link][%:description]]\n %:initial\n \nCaptured On: %U") - ))) ;; REFILE ;; |