Updated emacs daily capture to be relative

This commit is contained in:
Random936 2024-06-08 15:30:13 -07:00
parent 57c91e65cf
commit 1a7be700a1
2 changed files with 7 additions and 5 deletions

View File

@ -12,6 +12,12 @@ Shortcut to goto todays org-roam dailies document.
(file-base (file-name-base (buffer-file-name))))
(s-matches-p "^[0-9]+-[0-9]+-[0-9]+$" file-base)))
(defun jm/org-roam-capture-day ()
(interactive)
(if (jm/dailies-file-p)
(org-roam-dailies--capture (date-to-time (file-name-base (buffer-file-name))))
(org-roam-dailies-capture-today)))
(defun jm/org-roam-goto-day (days)
(let* ((base-time (if (and (jm/dailies-file-p) (not (eq days 0)))
(date-to-time (file-name-base (buffer-file-name)))

View File

@ -255,11 +255,7 @@ Below is the main config for org-roam.
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)
("C-c n o" . org-id-get-create)
;; Dailies
("C-c n t" . org-roam-dailies-capture-today)
("C-c n y" . org-roam-dailies-capture-yesterday)
("C-c n k" . org-roam-dailies-capture-tomorrow))
("C-c n t" . jm/org-roam-capture-day))
:config
;; Config for org-roam capture templates.
(setq jm/org-roam-templates-directory (expand-file-name "templates" org-roam-directory)