aboutsummaryrefslogtreecommitdiff
path: root/.emacs.local.d/modes
diff options
context:
space:
mode:
authorRaul Benencia <id@rbenencia.name>2023-01-29 16:41:13 -0800
committerRaul Benencia <id@rbenencia.name>2023-01-29 16:41:13 -0800
commit8e5c59eb8b83703a63b084d2afc8c1c3ef512394 (patch)
tree3849113b44f8b398f364fd8ebe377d7a125d8dd6 /.emacs.local.d/modes
parent2878b40fbe004026dceb8dc0f54d8e127b93ce7f (diff)
emacs: org projects support
Diffstat (limited to '.emacs.local.d/modes')
-rw-r--r--.emacs.local.d/modes/org.el56
1 files changed, 20 insertions, 36 deletions
diff --git a/.emacs.local.d/modes/org.el b/.emacs.local.d/modes/org.el
index d1c0a2f..c04e01f 100644
--- a/.emacs.local.d/modes/org.el
+++ b/.emacs.local.d/modes/org.el
@@ -34,10 +34,6 @@
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture)
-
-(global-set-key (kbd "<f9> I") 'bh/punch-in)
-(global-set-key (kbd "<f9> O") 'bh/punch-out)
-
;; ORG STATES ;;
(setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
@@ -99,13 +95,6 @@
'((nil :maxlevel . 3)
(org-agenda-files :maxlevel . 3)))
-; Exclude DONE state tasks from refile targets
-(defun bh/verify-refile-target ()
- "Exclude todo keywords with a done state from refile targets"
- (not (member (nth 2 (org-heading-components)) org-done-keywords)))
-
-(setq org-refile-target-verify-function 'bh/verify-refile-target)
-
; Targets complete directly with IDO
(setq org-outline-path-complete-in-steps nil)
@@ -173,6 +162,26 @@
(org-agenda-entry-types '(:deadline))
(org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "\nšŸ•˜ Upcoming deadlines (+14d)\n")))
+
+ (tags-todo "REFILE"
+ ((org-agenda-overriding-header "Tasks to Refile")
+ (org-agenda-block-separator nil)
+ ))
+
+ (tags-todo "-CANCELLED/!"
+ ((org-agenda-overriding-header "Stuck Projects")
+ (org-agenda-skip-function 'bh/skip-non-stuck-projects)
+ (org-agenda-block-separator nil)
+ (org-agenda-sorting-strategy
+ '(category-keep))))
+
+ (tags-todo "-HOLD-CANCELLED/!"
+ ((org-agenda-overriding-header "Projects")
+ (org-agenda-skip-function 'bh/skip-non-projects)
+ (org-agenda-block-separator nil)
+ (org-tags-match-list-sublevels 'indented)
+ (org-agenda-sorting-strategy
+ '(category-keep))))
))
))
@@ -184,31 +193,6 @@
(setq org-agenda-dim-blocked-tasks nil)
(setq org-agenda-block-separator 61)
-(defun bh/skip-non-archivable-tasks ()
- "Skip trees that are not available for archiving"
- (save-restriction
- (widen)
- ;; Consider only tasks with done todo headings as archivable candidates
- (let ((next-headline (save-excursion (or (outline-next-heading) (point-max))))
- (subtree-end (save-excursion (org-end-of-subtree t))))
- (if (member (org-get-todo-state) org-todo-keywords-1)
- (if (member (org-get-todo-state) org-done-keywords)
- nil
- (or subtree-end (point-max)))
- next-headline))))
-
-(defun bh/org-auto-exclude-function (tag)
- "Automatic task exclusion in the agenda with / RET"
- (and (cond
- ((string= tag "hold")
- t))
- (concat "-" tag)))
-
-(setq org-agenda-auto-exclude-function 'bh/org-auto-exclude-function)
-(setq org-agenda-span 'day)
-(setq org-deadline-warning-days 30)
-
-
(defun bh/is-project-p ()
"Any task with a todo keyword subtask"
(save-restriction
nihil fit ex nihilo