From b3b03e46ea9626ad12a74d6ea7f90ceca1bf1d4f Mon Sep 17 00:00:00 2001 From: mattkae Date: Thu, 22 Jun 2023 12:34:12 -0400 Subject: Using vertico isntead of helm now; created a way to archive all tasks in an org buffer; created better capture templates --- lisp/org-custom.el | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'lisp/org-custom.el') diff --git a/lisp/org-custom.el b/lisp/org-custom.el index 61b7532..1037771 100644 --- a/lisp/org-custom.el +++ b/lisp/org-custom.el @@ -38,8 +38,7 @@ (setq org-directory "~/OrgRoam") (setq org-agenda-files '("~/OrgRoam" "~/OrgRoam/daily")) - - +(setq org-default-notes-file (concat org-directory "/inbox.org")) (setq org-todo-keywords '((sequence "TODO" "PROGRESS" "VERIFY" "|" "DONE" "ABANDONED"))) @@ -58,9 +57,9 @@ :ensure t :config (org-alert-enable) - (setq org-alert-interval 6000 ; Once per hour! - org-alert-notify-cutoff 10 - org-alert-notify-after-event-cutoff nil + (setq org-alert-interval 3600 ; Once per hour! + org-alert-notify-cutoff 30 + org-alert-notify-after-event-cutoff 30 alert-default-style 'libnotify)) (use-package org-roam @@ -73,11 +72,27 @@ ("C-c n g" . org-roam-graph) ("C-c n j" . org-roam-dailies-capture-today) ("C-c n t" . org-roam-tag-add) - ("C-c n a" . org-roam-alias-add)) + ("C-c n a" . org-roam-alias-add) + ("C-c n c" . org-capture)) :config (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) (org-roam-setup) ) +(setq org-capture-templates + '(("t" "Todo" entry (file+headline org-default-notes-file "Tasks") + "* TODO %?\n DEADLINE: %t") + ("q" "Quick Notes" entry (file+headline org-default-notes-file "Quick Notes") + "* %?\Created on %U\n %i"))) + +(defun org-archive-done-tasks () + "Archive all done tasks in an org subtree" + (interactive) + (org-map-entries + (lambda () + (org-archive-subtree) + (setq org-map-continue-from (org-element-property :begin (org-element-at-point)))) + "/DONE" 'tree)) + (provide 'org-custom) ;;; org-custom.el ends here -- cgit v1.2.1