Refactoring how org configuration works

This commit is contained in:
Colin Powell
2020-03-20 23:12:22 -04:00
parent e3da570fdf
commit ecc022e829
2 changed files with 11 additions and 56 deletions

View File

@ -3,11 +3,6 @@
;;; Commentary:
;;; Code:
(setq +inbox-file "~/org/inbox.org")
(setq +project-file "~/org/projects.org")
(setq +reminders-file "~/org/reminders.org")
(setq +today-file "~/org/today.org")
(setq +work-file "~/org/15five.org")
(after! org
(setq org-directory (expand-file-name "~/org/")
@ -46,82 +41,41 @@
("WAITING" . (:foreground "forest green"))
("WONTDO" . (:foreground "forest green"))
("DONE" . (:foreground "light sea green"))))
org-agenda-span 5
org-agenda-start-day "1d"
org-agenda-custom-commands
'(("N" "List all next tasks" ((agenda "" ((org-agenda-span 1)))
(tags "@errand/-DONE") ; should generaly be pretty empty
(tags "@book/NEXT") ; should generaly be pretty empty
(tags "@work/NEXT")
(tags "@home/NEXT")
(tags "@farm/NEXT")
(tags "@town/NEXT")))
("R" "Weekly Review"
((agenda "" ((org-agenda-span 7)))
(stuck "") ; review stuck projects as designated by org-stuck-projects
(tags "PROJECT/-DONE-MAYBE") ; review all projects
(todo "MAYBE") ; review someday/maybe items
(todo "WAITING")))) ; review waiting items
;;org-use-tag-inheritance t; bug in variable below, just turn 'em off
;;org-tags-exclude-from-injeritance '("PROJECT" "SPRINT") ; PROJECT should not be inheritable
org-stuck-projects
'("+PROJECT/-MAYBE-DONE" ("TODO" "NEXT") nil "\\<IGNORE\\>")
org-tag-alist '(("@personal" . ?h)
("@farm" . ?f)
("@town" . ?s)
("@errand" . ?e)
("@15five" . ?w)
("@family" . ?m))
org-modules '(ol-eshell
ol-notmuch
ob-eval
ob-exp
ob-http
org-drill
org-id)
org-id)))
;; Refiling
(setq org-refile-targets '((nil :maxlevel . 9)
(org-agenda-files :maxlevel . 9)))
(setq org-outline-path-complete-in-steps nil) ; Refile in a single go
(setq org-refile-use-outline-path t) ; Show full paths for refiling
; refile targets
org-refile-targets '(("~/org/today.org" :maxlevel . 2)
("~/org/someday.org" :maxlevel . 2)
("~/org/projects.org" :maxlevel . 2)
("~/org/inbox.org" :maxlevel . 2)
("~/org/15five.org" :maxlevel . 2))))
;; org-match-sparse-tree
;;
;; org-set-tags-command
(setq +inbox-file "~/org/inbox.org")
(defun +open-inbox-file ()
(interactive)
"Opens the inbox file"
(find-file +inbox-file))
(defun +open-projects-file ()
(interactive)
"Opens the projects file"
(find-file +project-file))
(defun +open-reminders-file ()
(interactive)
"Opens the reminders file"
(find-file +reminders-file))
(defun +open-today-file ()
(interactive)
"Opens the today file"
(find-file +today-file))
(defun +open-work-file ()
(interactive)
"Opens the today file"
(find-file +work-file))
(map!
:leader
:desc "Open inbox" "I" #'+open-inbox-file
:desc "Open projects" "E" #'+open-projects-file
:desc "Open work" "W" #'+open-work-file
:desc "Open today" "T" #'+open-today-file)
:desc "Open today" "T" #'org-roam-today
:desc "Open tomorrow" "N" #'org-roam-tomorrow)
(defun +show-agenda ()
(interactive)

View File

@ -127,6 +127,7 @@
(interactive)
(let ((fill-column (point-max)))
(fill-paragraph nil)))
;; Handy key definition
(define-key global-map "\M-z" 'unfill-paragraph)