summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-09-03 13:58:22 -0500
committerCraig Jennings <c@cjennings.net>2025-09-03 13:58:22 -0500
commit0fe3065f7ca9aa4c02c48e186fccb91ad3a81f59 (patch)
tree1cbf333c164e6d825f552ca891e9f8c94d1b640d /modules
parent15bb7b44ef51067c09415b87d1d55f58b2a8c08b (diff)
downloaddotemacs-0fe3065f7ca9aa4c02c48e186fccb91ad3a81f59.tar.gz
dotemacs-0fe3065f7ca9aa4c02c48e186fccb91ad3a81f59.zip
refactor: Simplify org-capture templates; fix duplicate properties
The commit simplifies and streamlines the Org configuration by: - Removing grocery and shopping list templates - Cleaning up org-roam templates by moving content to template files - Removing webclip specific template and function - Improving formatting and indentation for better readability This also fixes an issue where duplicate org-roam properties were being inserted into the resulting capture file.
Diffstat (limited to 'modules')
-rw-r--r--modules/org-capture-config.el6
-rw-r--r--modules/org-roam-config.el74
2 files changed, 30 insertions, 50 deletions
diff --git a/modules/org-capture-config.el b/modules/org-capture-config.el
index e9a83d9d..f56f322a 100644
--- a/modules/org-capture-config.el
+++ b/modules/org-capture-config.el
@@ -101,12 +101,6 @@ Captured On: %U\n" :prepend t)
Captured On: %U"
:prepend t)
- ("g" "Grocery List Item" item
- (file+headline inbox-file "Grocery List") "%?")
-
- ("s" "Shopping List Entry" entry
- (file+headline inbox-file "Shopping List") "* %?")
-
;; requires cj/org-web-clipper function defined above
("w" "Web Page Clipper" entry
(file+headline inbox-file "To Read")
diff --git a/modules/org-roam-config.el b/modules/org-roam-config.el
index 1f1524aa..684b83c8 100644
--- a/modules/org-roam-config.el
+++ b/modules/org-roam-config.el
@@ -17,41 +17,36 @@
(org-roam-completion-everywhere t)
(org-roam-dailies-capture-templates
'(("d" "default" entry "* %<%I:%M:%S %p %Z> %?"
- :if-new (file+head "%<%Y-%m-%d>.org" "#+FILETAGS: Journal
-#+TITLE: %<%Y-%m-%d>"))))
+ :if-new (file+head "%<%Y-%m-%d>.org"
+ "#+FILETAGS: Journal #+TITLE: %<%Y-%m-%d>"))))
+
(org-roam-capture-templates
'(("d" "default" plain "%?"
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}\n")
- :unnarrowed t)
- ("w" "webclip" plain "%?"
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}
-#+FILETAGS: webclipped
-#+ROAM_KEY: ${url}
-URL: ${url}
-Captured On: %U
-
-${body}")
- :unnarrowed t
- :immediate-finish t)
- ("v" "v2mom" plain
- (function (lambda () (concat roam-dir "templates/v2mom.org")))
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}\n")
- :unnarrowed t)
- ("r" "recipe" plain
- (function (lambda () (concat roam-dir "templates/recipe.org")))
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}
- #+CATEGORY: ${title}\n#+FILETAGS: Recipe\n#+STARTUP: showall")
- :unnarrowed t)
- ("p" "project" plain
- (function (lambda () (concat roam-dir "templates/project.org")))
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}
- #+CATEGORY: ${title}\n#+FILETAGS: Project")
- :unnarrowed t)
- ("t" "topic" plain
- (function (lambda () (concat roam-dir "templates/topic.org")))
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}
- #+CATEGORY: ${title}\n#+FILETAGS: Topic")
- :unnarrowed t)))
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
+ "#+TITLE: ${title}\n")
+ :unnarrowed t)
+
+ ("v" "v2mom" plain
+ (function (lambda () (concat roam-dir "templates/v2mom.org")))
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
+ :unnarrowed t)
+
+ ("r" "recipe" plain
+ (function (lambda () (concat roam-dir "templates/recipe.org")))
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
+ :unnarrowed t)
+
+ ("p" "project" plain
+ (function (lambda () (concat roam-dir "templates/project.org")))
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
+ :unnarrowed t)
+
+ ("t" "topic" plain
+ (function (lambda () (concat roam-dir "templates/topic.org")))
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "")
+ :unnarrowed t)))
+
+
:bind (("C-c n ?" . org-roam-hydra/body)
("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
@@ -130,9 +125,8 @@ created nodes are added to the agenda and follow a template defined by
nil
:templates
`((,template-key ,tag plain (file ,template-file)
- :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
- ,(concat "#+TITLE: ${title}
-#+CATEGORY: ${title}\n#+FILETAGS: " tag))
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
+ "")
:unnarrowed t))))
(defun cj/org-roam-find-node-topic ()
@@ -151,14 +145,6 @@ created nodes are added to the agenda and follow a template defined by
(interactive)
(cj/org-roam-find-node "Project" "p" (concat roam-dir "templates/project.org")))
-(defun cj/org-roam-find-node-webclip ()
- "List nodes of type 'webclipped' in completing read for selection."
- (interactive)
- (org-roam-node-find
- nil
- nil
- (cj/org-roam-filter-by-tag "webclipped")
- nil))
;; ---------------------- Org Capture After Finalize Hook ----------------------