]> git.earman.xyz Git - emacsinit.git/commitdiff
Change layout of kasten folder & template
authorrearman <rearman@r717.net>
Wed, 14 Dec 2022 20:46:29 +0000 (15:46 -0500)
committerrearman <rearman@r717.net>
Wed, 14 Dec 2022 20:46:29 +0000 (15:46 -0500)
Zettel are now of the form <Datestamp>.org, in ~/org/kasten.  Defun
erfassen-zettel creates a filename with the current stamp when called in the
capture template.  Said template is updated to have a place-holder for tags at
the end of a header.

init.el

diff --git a/init.el b/init.el
index 1ba2ed03303ec4249e762cccb33a5999a419bd16..c174534550e2070dfe4138c4e070b27fc92a8795 100644 (file)
--- a/init.el
+++ b/init.el
       org-startup-indented t
       org-catch-invisible-edits 'show
       org-directory "~/org"
-      org-agenda-files '("~/org/")
+      org-agenda-files '("~/org/" "~/org/kasten/")
       org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))
       org-default-notes-file (concat org-directory "/notes.org")
       org-service-notes-file (concat org-directory "/service.org")
-      org-capture-templates '(("t" "Default TODO" entry (file+datetree org-default-notes-file)
-                              "* TODO %?")
-                             ("s" "Service Req." entry (file+datetree org-service-notes-file)
-                              "* TODO %?\nDEADLINE: %^t\n")))
+      org-zettel-kasten (concat org-directory "/kasten/zettel.org")
+      org-capture-templates '(("t" "TODO" entry (file+datetree org-default-notes-file) "* TODO %?")
+                             ("z" "Zettel" entry (file erfassen-zettel) "* %? ::")
+                             ("s" "Service Req." entry (file+datetree org-service-notes-file) "* TODO %?\nDEADLINE: %^t\n")))
 
 ;; OPTIONS
 (recentf-mode t)
   (xterm-mouse-mode 1))
 
 ;; DEFUNS
+(defun erfassen-zettel ()
+  "Add a new zettel to the kasten.
+Creates a new file <datestamp>.org in ~/org/kasten."
+  (interactive)
+  (expand-file-name (concat (format-time-string "%Y-%m-%d-%H%M") ".org") "~/org/kasten/"))
+
 (defun open-line-below ()
   "Creates a new empty line below the current line."
   (interactive)