From: rearman Date: Wed, 14 Dec 2022 21:18:01 +0000 (-0500) Subject: Add -name to zettel template X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=6faea5f600d3d45c5a0ed2fce62eabcf5ad13d98;p=emacsinit.git Add -name to zettel template --- diff --git a/init.el b/init.el index c174534..4f00227 100644 --- a/init.el +++ b/init.el @@ -128,9 +128,10 @@ ;; DEFUNS (defun erfassen-zettel () "Add a new zettel to the kasten. -Creates a new file .org in ~/org/kasten." +Creates a new file -name.org in ~/org/kasten." (interactive) - (expand-file-name (concat (format-time-string "%Y-%m-%d-%H%M") ".org") "~/org/kasten/")) + (let ((name (read-string "Zettel-Name: "))) + (expand-file-name (format "%s-%s.org" (format-time-string "%Y-%m-%d-%H%M") name) "~/org/kasten/"))) (defun open-line-below () "Creates a new empty line below the current line."