From e5fad6e73c2d5c86a0afe538853d9545a7814567 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 9 Apr 2024 14:05:01 -0400 Subject: [PATCH] Modify Org Roam file names --- config.org | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 4f73813..4b75ff4 100644 --- a/config.org +++ b/config.org @@ -3305,6 +3305,15 @@ Here's a handful of bindings that streamline common operations I use: "m R" #'org-roam-extract-subtree) #+end_src +*** Roam File Names + +By default, Roam generates file names containing both a timestamp and the node title. This makes it annoying if I want to change the title of that node later, so I'll change it to just the timestamp. + +#+begin_src emacs-lisp +(after! org-roam + (setq org-roam-extract-new-file-path "%<%Y-%m-%d_%H-%M-%S>.org")) +#+end_src + *** Roam Buffer The unlinked references section is turned off by default for performance reasons, but I've never had any serious issues with it. Let's turn that on, and also make sure backlinks are unique. @@ -3377,14 +3386,14 @@ Since Org-roam is currently my primary method of using Org, I only use its templ (unless dir (setq dir org-roam-directory)) (or (org-roam-node-file node) (expand-file-name - (concat "%<%Y%m%d%H%M%S>-" (org-roam-node-slug node) ".org") + (concat "%<%Y-%m-%d_%H-%M-%S>.org") dir))) (defun org-roam-node-file-maybe-dir (node) "Get file name from NODE, or ask for directory and return a default filename." (or (org-roam-node-file node) (expand-file-name - (concat "%<%Y%m%d%H%M%S>-" (org-roam-node-slug node) ".org") + (concat "%<%Y-%m-%d_%H-%M-%S>.org") (read-directory-name "Directory: " org-roam-directory)))) #+end_src