Is there a command to insert a link to a dailies note? I searched through the org-roam-dailies
commands and could not find one. (I would like it to show a date picker, creating the dailies note if it does not exist, and inserting a link to it.)
I wrote these functions to give me functionality along those lines. The only problem that I have with it is that I can’t use it inside of a capture template because it messes up the window configuration.
(defun matt/org-roam-dailies-insert-date ()
(interactive)
(save-window-excursion (save-excursion
(org-roam-dailies-goto-date)
(save-buffer)
(org-store-link nil 'not-interactive)
(let* ((id (car (car org-stored-links)))
(description (org-roam--file-keyword-get "TITLE"))
(updated (list id description)))
(setq org-stored-links (cons updated (cdr org-stored-links))))))
(call-interactively 'matt/org-insert-last-stored-link-without-newline))
(defun matt/org-insert-last-stored-link-without-newline (arg)
"Insert the last link stored in `org-stored-links' like
`org-insert-last-stored-link', but without a trailing newline."
(interactive "p")
(org-insert-all-links arg "" ""))```
Thank you for sharing your code!