From cda7afdc81af3418f178721e95dc2f9a1683e743 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Mon, 28 Apr 2025 07:19:01 -0700 Subject: [PATCH] trying a new capture template --- org.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/org.el b/org.el index 1f43a94..e3d1997 100644 --- a/org.el +++ b/org.el @@ -48,6 +48,12 @@ (metacircular-publish-2) (metacircular-upload)) +(defun get-current-org-date-timestamp () + (format-time-string (car org-time-stamp-formats) (current-time))) + +(defun get-current-org-datetime-timestamp () + (format-time-string (cdr org-time-stamp-formats) (current-time))) + (use-package org-roam :after org :custom @@ -64,13 +70,13 @@ :unnarrowed t) ("p" "project" plain "- Repo: [[%^{Url}][%^{title}]]\n\nOne sentence summary.\n\n** Tasks [/]" :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" - "#+title: ${title}\n#+date: %U\n#+options: toc:nil num:nil\n#+filetags: project\n\n") + "#+title: ${title}\n#+date: %(get-current-org-date-timestamp)\n#+options: toc:nil num:nil\n#+filetags: project\n\n") :unnarrowed t))) (org-roam-dailies-capture-templates '(("d" "default" entry "* %?" :target (file+head "%<%Y-%m-%d>.org" - "#+title: %<%Y-%m-%d>\n")))) + "#+title: %(get-current-org-date-timestamp)\n")))) :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) ("C-c n g" . org-roam-graph) @@ -102,7 +108,6 @@ :target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n\n")))) - (defvar *org-remote-site* "/ssh:web.metacircular.net:/srv/www/metacircular/" "Where should org-mode files be published?") (require 'ox-publish)