1
0
Fork 0

Use a single file for all my org needs

This commit is contained in:
Tom Willemse 2020-08-12 20:44:22 -07:00
parent 68e1de0ecb
commit 08f2f54e3e

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2020.0805.092134 ;; Version: 2020.0812.204341
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons org-roam) ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish all-the-icons org-roam)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -186,9 +186,6 @@ _l_: Store link ^^ _j_: Journal entry
("A" (org-capture nil "a")) ("A" (org-capture nil "a"))
("j" (org-capture nil "j"))) ("j" (org-capture nil "j")))
(setq org-default-notes-file
(oni-org-expand-to-home "documents/gtd/inbox.org"))
(setq org-agenda-skip-function-global #'oni-org-skip-tasks) (setq org-agenda-skip-function-global #'oni-org-skip-tasks)
(setq org-agenda-tags-todo-honor-ignore-options t) (setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-todo-ignore-scheduled 'future) (setq org-agenda-todo-ignore-scheduled 'future)
@ -212,8 +209,10 @@ _l_: Store link ^^ _j_: Journal entry
(setq org-list-description-max-indent 5) (setq org-list-description-max-indent 5)
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
'(("c" "Today's (Current) tasks" tags "SCHEDULED=\"<today>\"") '(("i" "Inbox" tags "-{.}+CATEGORY=\"everything\"")
("t" "Todo" tags-todo "-work-shopping") ("t" "Next" tags-todo "TODO=\"NEXT\"")
("S" "Someday" tags-todo "CATEGORY=\"todo\"")
("c" "Today's (Current) tasks" tags "SCHEDULED=\"<today>\"")
("w" . "Work topics") ("w" . "Work topics")
("wo" "Overview" ((tags-todo "+work-remy-mia") ("wo" "Overview" ((tags-todo "+work-remy-mia")
(tags-todo "+work+idea+mia") (tags-todo "+work+idea+mia")
@ -223,20 +222,8 @@ _l_: Store link ^^ _j_: Journal entry
("wr" "Topics for Remy" tags-todo "+work+idea+remy") ("wr" "Topics for Remy" tags-todo "+work+idea+remy")
("s" "Shopping" tags-todo "+shopping"))) ("s" "Shopping" tags-todo "+shopping")))
(setq org-agenda-files (setq org-default-notes-file "~/documents/gtd/everything.org")
(mapcar #'oni-org-expand-to-home (setq org-agenda-files (list org-default-notes-file))
'("documents/gtd/todo.org")))
(setq org-refile-targets
(mapcar (lambda (pair)
(cons (oni-org-expand-to-home (car pair))
(cdr pair)))
'(("documents/gtd/todo.org" :maxlevel . 1)
("documents/gtd/projects.org" :level . 2)
("documents/gtd/someday.org" :maxlevel . 1)
("documents/gtd/music.org" :maxlevel . 1)
("documents/gtd/books.org" :maxlevel . 1)
("documents/gtd/bookmarks.org" :maxlevel . 2))))
(defun oni-org-find-heading-in-file (heading file &optional move) (defun oni-org-find-heading-in-file (heading file &optional move)
"Try to find HEADING somewhere in FILE. "Try to find HEADING somewhere in FILE.
@ -294,15 +281,13 @@ also move point to the start of the heading."
'(("n" ((in-mode . "nov-mode"))))) '(("n" ((in-mode . "nov-mode")))))
(setq org-capture-templates (setq org-capture-templates
`(("i" "Inbox" entry `(("i" "Inbox" entry (file "")
(file ,(oni-org-expand-to-home "documents/gtd/inbox.org")) "* %?\n:PROPERTIES:\n:CREATED: %U\n:ORIGIN: %a\n:END:\n\n")
"* %?\n:PROPERTIES:\n:CREATED: %U\n:ORIGIN: %a\n:END:\n\n%i") ("I" "Inbox (add selection)" entry (file "")
("t" "Task" entry "* %?\n:PROPERTIES:\n:CREATED: %U\n:ORIGIN: %a\n:END:\n\n#+begin_quote\n%i\n#+end_quote")
(file ,(oni-org-expand-to-home "documents/gtd/inbox.org")) ("t" "Task" entry (file "")
"* TODO %i%?\n :PROPERTIES:\n :CREATED: %U\n :END:") "* TODO %i%?\n :PROPERTIES:\n :CREATED: %U\n :END:")
("a" "Appointment" entry ("a" "Appointment" entry (file "")
(file+headline ,(oni-org-expand-to-home "documents/gtd/todo.org")
"Appointments")
"* TODO %i%?\n %U") "* TODO %i%?\n %U")
("j" "Journal entry" entry ("j" "Journal entry" entry
(file+olp+datetree (file+olp+datetree