Roam-Dailies: How to return to the previous windows after org-roam-dailies-capture-today?

Hi,

I really like the idea of the org-roam-dailies. However, when I invoke org-roam-dailies-capture-today, add something and then finish by C-c C-c I’m always taken to the “daily” I just added to. I don’t know if this is a feature or a bug but I would strongly prefer returning to my previous windows, a behaviour similar to org-capture. Is there something I can do about this?

I tried to fix this myself but my knowledge in this regard is still shallow:

(defun my-org-roam-dailies-capture-today ()
   (interactive)
   (let ((split-width-threshold 0)
          (split-height-threshold nil))
(org-roam-dailies-capture-today)
(save-buffer)
(delete-window)))

Yet this only creates a new window, saves the buffer and then deletes the new window - missing the crucial part of running org-roam-dailies-capture-today.

This is a bug, that should not be the behaviour.

Thanks for clearing that up!

This behaviour has now been fixed in master.

Great, thanks for the quick fix!!

For anybody interested in a capturing in a horizontal window, this does the trick:

(defun my-org-roam-dailies-capture-today ()
   (interactive)
   (let ((split-width-threshold 0)
         (split-height-threshold nil))
     (org-roam-dailies-capture-today)))
 
 (global-set-key (kbd "s-<") 'my-org-roam-dailies-capture-today)
1 Like