File: fix-dailies-avoid-assuming-value-of-org-roam-dailies-dire.patch

package info (click to toggle)
org-roam 1.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 38,912 kB
  • sloc: lisp: 4,508; sh: 741; makefile: 130
file content (48 lines) | stat: -rw-r--r-- 1,860 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Fri, 5 Mar 2021 19:51:29 -0700
Subject: (fix): dailies: avoid assuming value of org-roam-dailies-directory
 (#1426)

(cherry picked from commit 643b98eeb357f8fcc496c6badcca3879fbb79d76)
---
 org-roam-dailies.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/org-roam-dailies.el b/org-roam-dailies.el
index daca237..3eaa777 100644
--- a/org-roam-dailies.el
+++ b/org-roam-dailies.el
@@ -59,18 +59,19 @@
   :type 'hook)
 
 (defcustom org-roam-dailies-capture-templates
-  '(("d" "default" entry (function org-roam-capture--get-point)
+  `(("d" "default" entry (function org-roam-capture--get-point)
      "* %?"
-     :file-name "daily/%<%Y-%m-%d>"
+     :file-name ,(concat org-roam-dailies-directory "%<%Y-%m-%d>")
      :head "#+title: %<%Y-%m-%d>\n"))
   "Capture templates for daily-notes in Org-roam."
   :group 'org-roam
   ;; Adapted from `org-capture-templates'
   :type
-  '(repeat
+  `(repeat
     (choice :value ("d" "default" plain (function org-roam-capture--get-point)
                     "%?"
-                    :file-name "daily/%<%Y-%m-%d>"
+                    :file-name ,(concat org-roam-dailies-directory
+					"%<%Y-%m-%d>")
                     :head "#+title: %<%Y-%m-%d>\n"
                     :unnarrowed t)
       (list :tag "Multikey description"
@@ -94,7 +95,8 @@ Template string   :\n%v")
             (const :format "" function)
             (function :tag "Template function ")))
         (const :format "File name format  :" :file-name)
-        (string :format " %v" :value "daily/%<%Y-%m-%d>")
+        (string :format " %v" :value ,(concat org-roam-dailies-directory
+					      "%<%Y-%m-%d>"))
         (const :format "Header format     :" :head)
         (string :format " %v" :value "#+title: ${title}\n")
         (plist :inline t