From 282d0010faa8722120c1b94f3531507e8cea9c9f Mon Sep 17 00:00:00 2001 From: Steven Lang Date: Fri, 7 Feb 2020 09:47:47 +0100 Subject: [PATCH] Add org-roam-tomorrow and org-roam-date Similar to `org-roam-today`: - `org-roam-tomorrow`: Add file for tomorrow - `org-roam-date`: Add file for any date (choose via date picker) --- org-roam.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/org-roam.el b/org-roam.el index f57a967..04905b6 100644 --- a/org-roam.el +++ b/org-roam.el @@ -228,6 +228,16 @@ If called interactively, then PARENTS is non-nil." (interactive) (org-roam--new-file-named (format-time-string "%Y-%m-%d" (current-time)))) +(defun org-roam-tomorrow () + "Create the file for tomorrow." + (interactive) + (org-roam--new-file-named (format-time-string "%Y-%m-%d" (time-add 86400 (current-time))))) + +(defun org-roam-date () + "Create the file for any date using the calendar." + (interactive) + (let ((time (org-read-date nil 'to-time nil "Date: "))) + (org-roam--new-file-named (format-time-string "%Y-%m-%d" time)))) ;;; Org-roam buffer updates (defun org-global-props (&optional property buffer)