diff --git a/mostalive/convert-journelly-to-org-roam.el b/mostalive/convert-journelly-to-org-roam.el index 24b42d0..86d57b6 100644 --- a/mostalive/convert-journelly-to-org-roam.el +++ b/mostalive/convert-journelly-to-org-roam.el @@ -40,15 +40,9 @@ Opens the capture buffer for review before finalizing." (content (journelly-entry-content parsed)) (heading (journelly-entry-heading parsed)) (url (journelly-entry-url parsed))) - ;; Build the initial content + ;; Build the initial content without ID (org-roam will add it) (let ((initial-content (concat - ":PROPERTIES:\n" - ":ID: " (org-id-new) "\n" - (when url (concat ":ROAM_REFS: " url "\n")) - (when heading (concat ":JOURNELLY_HEADING: " heading "\n")) - ":END:\n" - "#+title: " title "\n\n" (or content "") "\n"))) (org-roam-capture- :node (org-roam-node-create :title title) @@ -56,9 +50,12 @@ Opens the capture buffer for review before finalizing." :jump-to-captured t) :templates `(("d" "default" plain ,initial-content - :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "") + :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" + ,(concat "#+title: ${title}\n" + (when url (concat "#+roam_refs: " url "\n")) + (when heading (concat "#+journelly_heading: " heading "\n")) + "\n")) :unnarrowed t)))))) - (ert-deftest test-journelly-parse-basic () (let* ((entry " * [2025-10-08 Wed 22:39] @ - Paul is #XP