diff options
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r-- | .emacs.d/lisp/init-org.el | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el index 2c6c7ee..1840d7d 100644 --- a/.emacs.d/lisp/init-org.el +++ b/.emacs.d/lisp/init-org.el @@ -43,6 +43,7 @@ (setq org-clock-persist 'history) (org-clock-persistence-insinuate) + (setq org-tags-column (- fill-column)) ;; refile (setq org-refile-targets '((nil :maxlevel . 9) @@ -66,7 +67,7 @@ (setq org-tag-alist '((:startgroup . nil) ("@work" . ?w) ("@home" . ?h) ("errants" . ?e) (:endgroup . nil) - ("phone" . ?p) + ("phone" . ?m) ("FLAGGED" . ?f) ("URGENT" . ?u) ("PROJECT" . ?p))) @@ -80,9 +81,21 @@ ;; org-habit (add-to-list 'org-modules 'org-habit t)) +(use-package org-ql + :ensure t + :after (org) + :init + (defun my-org-agenda-block--stuck-projects (&rest args) + "A block showing stuck projects." + (setq org-ql-block-header "Stuck Projects") + (org-ql-block '(and (tags "PROJECT") + (not (or (done) (todo "SOMEDAY"))) + (not (descendants (todo "NEXT"))) + (not (descendants (scheduled))))))) + (use-package org-agenda :ensure nil - :after (org) + :after (org org-ql) :commands (org-agenda) :init (setq org-agenda-dim-blocked-tasks nil) @@ -94,19 +107,23 @@ ;; (tags . "%i %-12:c") ;; (search . " %i %-12:c"))) + (setq org-agenda-tags-column org-tags-column) (setq org-deadline-warning-days 30) (setq org-agenda-compact-blocks t) + (setq org-agenda-custom-commands '(("D" "Daily agenda and all TODOs" ((agenda "" ((org-agenda-span 1))) (tags-todo "+PRIORITY=\"A\"") (tags-todo "computer|@office|phone") (tags "PROJECT+CATEGORY=\"elephants\"") + (my-org-agenda-block--stuck-projects) + (todo "NEXT") (todo "WAITING")) ((org-agenda-compact-blocks t))) ("W" "Weekly Review" ((agenda "" ((org-agenda-ndays-to-span 7))) - (stuck "") ; review stuck porjects as designated by org-stuck-projects + (my-org-agenda-block--stuck-projects) (todo "NEXT") (todo "WAITING"))) ("d" "Upcoming deadlines" agenda "" @@ -147,6 +164,8 @@ (evil-define-key 'normal 'global (kbd "<leader>fn") 'org-roam-node-find (kbd "<leader>cn") 'org-roam-dailies-goto-today) + (evil-define-key 'normal 'org-roam-mode-map + (kbd "<leader>oin") 'org-roam-node-insert) :config (setq org-roam-db-gc-threshold most-positive-fixnum) (setq org-roam-dailies-directory "journals/") |