commit 2636d974e59a87988b1426851d956187a974ce2b
parent 856bd38c41164eaec202bff910be8ee30c1785da
Author: Lukas Henkel <lh@entf.net>
Date: Mon, 16 Jan 2023 21:05:38 +0100
First basic GTD setup
Diffstat:
M | init.el | | | 31 | ++++++++++++++++++++++++++++++- |
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/init.el b/init.el
@@ -45,6 +45,10 @@
(tool-bar-mode (if tool-bar-mode -1 1))
(scroll-bar-mode (if scroll-bar-mode -1 1)))
+(defun lh/org-capture-skip-below-toplevel ()
+ (when (> (org-current-level) 1)
+ (save-excursion (org-end-of-subtree t))))
+
(defmacro lh/global-set-keys (keys-alist)
`(progn
,@(seq-map
@@ -141,6 +145,9 @@
("C-c p" . lh/pop-out-buffer)
("C-c n" . lh/buffer-create-new)
+ ("C-c a" . org-agenda)
+ ("C-c c" . org-capture)
+ ("C-c l" . org-store-link)
("C-c i j" . lh/insert-json-encoded)
("C-c i i s" . lh/insert-random-sha1)
@@ -284,6 +291,22 @@
'(marginalia-mode t)
'(mouse-wheel-progressive-speed nil)
'(mouse-wheel-scroll-amount '(5 ((shift) . hscroll) ((meta)) ((control) . text-scale)))
+ '(org-agenda-custom-commands
+ '(("n" "Agenda and all TODOs"
+ ((agenda "" nil)
+ (alltodo "" nil))
+ nil)
+ ("g" "GTD View"
+ ((agenda "" nil)
+ (tags-todo "+aktion+TODO=\"NEXT\""
+ ((org-agenda-overriding-header "Nächste Aktionen:")))
+ (tags "projekt"
+ ((org-agenda-overriding-header "Projekte:")
+ (org-agenda-skip-function 'lh/org-capture-skip-below-toplevel)))
+ (tags-todo "WAITING"
+ ((org-agenda-overriding-header "Warten auf:"))))
+ nil nil)))
+ '(org-agenda-loop-over-headlines-in-active-region nil)
'(org-babel-load-languages
'((awk . t)
(lisp . t)
@@ -292,6 +315,7 @@
(restclient . t)))
'(org-log-done 'time)
'(org-log-done-with-time t)
+ '(org-refile-use-outline-path 'file)
'(org-src-window-setup 'other-window)
'(org-startup-folded t)
'(org-startup-indented t)
@@ -357,7 +381,12 @@
(list dir))
(customize-set-value
'org-roam-directory
- roam-dir))
+ roam-dir)
+ (with-eval-after-load "org"
+ (setq org-capture-templates
+ `(("g" "GTD Inbox" entry
+ (file ,(expand-file-name "inbox.org" dir))
+ "* %?")))))
(diminish 'which-key-mode)
(diminish 'aggressive-indent-mode)