dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 567a5b1af710bec429df314ebd7f93d653bfc9cd
parent c04923e3f5cddf0ef10188bc73303882cc07ddfe
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Wed,  5 Jan 2022 16:42:40 +0100

emacs: set up GTD in org mode

Diffstat:
Memacs/config.org | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+), 0 deletions(-)

diff --git a/emacs/config.org b/emacs/config.org @@ -713,6 +713,106 @@ Let a period followed by a single space be treated as end of sentence: #+end_src * Org mode +** Agenda & GTD +[[https://emacs.cafe/emacs/orgmode/gtd/2017/06/30/orgmode-gtd.html][Here's a good reference for setting up gtd in org mode]] + +Tell org where to find my stuff + +#+begin_src emacs-lisp + (setq org-life-dir "~/Documents/life/" + org-life-inbox (concat org-life-dir "inbox.org") + org-life-main (concat org-life-dir "life.org") + org-life-tickler (concat org-life-dir "tickler.org") + org-life-someday (concat org-life-dir "someday.org") + org-life-archive (concat org-life-dir "archive.org")) +#+end_src + +Which files should be included in the agenda (I have to use ~list~ to evaluate the variables, because org-agenda-files expects strings): + +#+begin_src emacs-lisp + (setq org-agenda-files (list org-life-main + org-life-inbox + org-life-tickler)) +#+end_src + +Templates for quick capture: + +#+begin_src emacs-lisp + (setq org-capture-templates `(("t" "Todo [inbox]" entry + (file+headline ,org-life-inbox "Tasks") + "* TODO %i%?") + ("T" "Tickler" entry + (file+headline ,org-life-tickler "Tickler") + "* %i%? \n %U"))) +#+end_src + +Where I want to be able to move stuff: + +#+begin_src emacs-lisp + (setq org-refile-targets `((,org-life-main :maxlevel . 3) + (,org-life-someday :level . 1) + (,org-life-tickler :maxlevel . 2))) +#+end_src + +Include the destination file as an element in the path to a heading, and to use the full paths as completion targets rather than just the heading text itself: + +#+begin_src emacs-lisp + (setq org-refile-use-outline-path 'file) +#+end_src + +Tell Org that you don’t want to complete in steps; you want Org to generate all of the possible completions and present them at once (necessary for Helm/Ivy): + +#+begin_src emacs-lisp + (setq org-outline-path-complete-in-steps nil) +#+end_src + +Allow me to tack new heading names onto the end of my outline path, and if I am asking to create new ones, make me confirm it: + +#+begin_src emacs-lisp + (setq org-refile-allow-creating-parent-nodes 'confirm) +#+end_src + +Todo keywords based on the GTD system (pipe separates incomplete from complete): + +#+begin_src emacs-lisp + (setq org-todo-keywords '("TODO(t)" "NEXT(n)" "WAITING(w)" "SOMEDAY(s)" "PROJECT(p)" + "|" "DONE(d)" "CANCELLED(c)")) +#+end_src + +Create custom agenda views: + +#+begin_src emacs-lisp + (setq org-agenda-custom-commands '(("w" todo "WAITING" nil) + ("n" todo "NEXT" nil) + ("d" "Agenda + Next Actions" + ((agenda) + (todo "NEXT"))))) +#+end_src + +Convenience function to make opening the main file faster: + +#+begin_src emacs-lisp + (defun gtd () (interactive) (find-file org-life-main)) +#+end_src + +I want to log into the LOGBOOK drawer (useful when I want to take quick notes): + +#+begin_src emacs-lisp + (setq org-log-into-drawer "LOGBOOK") +#+end_src + +I want to archive to a specific file, in a date tree: + +#+begin_src emacs-lisp + (setq org-archive-location (concat org-life-archive "::datetree/")) +#+end_src + +I also want to log when I finish a task (useful for archiving): + +#+begin_src emacs-lisp + (setq org-log-done 'time) +#+end_src + ** Tempo expansions #+begin_src emacs-lisp