From c998ff3beb3d7d67be931664680044b333c20a46 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Thu, 13 Oct 2022 20:20:25 +0200 Subject: [PATCH] [Org Roam] Configure org-roam-dailies --- config.org | 17 ++++++++++++++++- packages/mmk2410-tab-bar-helpers.el | 7 +++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/config.org b/config.org index 910f417..57dfdf4 100644 --- a/config.org +++ b/config.org @@ -1370,15 +1370,30 @@ Source: [[https://www.orgroam.com][orgroam.com]] (direction . right) (window-width . 0.33) (window-height . fit-window-to-buffer))) + (setq org-roam-dailies-directory "daily/") + (setq org-roam-dailies-capture-templates + '(("c" "clock" entry "* %<%H:%M> %?" + :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")) + ("n" "note" entry "* %?" + :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")) + ("t" "todo" entry "* TODO %?" + :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))) (require 'org-roam-protocol) + (require 'org-roam-dailies) (org-roam-db-autosync-mode) :bind (("C-c r f" . org-roam-node-find) ("C-c r i" . org-roam-node-insert) ("C-c r b" . org-roam-buffer-toggle) ("C-c r c" . org-roam-capture) ("C-c r g" . org-roam-graph) + :map org-mode-map + ("C-M-i" . completion-at-point) :map org-roam-mode-map - ("[mouse-1]" . #'org-roam-visit-thing))) + ("[mouse-1]" . #'org-roam-visit-thing) + :map org-roam-dailies-map + ("Y" . org-roam-dailies-capture-yesterday) + ("T" . org-roam-dailies-capture-tomorrow)) + :bind-keymap ("C-c r d" . org-roam-dailies-map)) #+end_src ** Org Roam Bibtex diff --git a/packages/mmk2410-tab-bar-helpers.el b/packages/mmk2410-tab-bar-helpers.el index 6e45501..826a056 100644 --- a/packages/mmk2410-tab-bar-helpers.el +++ b/packages/mmk2410-tab-bar-helpers.el @@ -52,13 +52,13 @@ (sit-for 1) (split-window-horizontally) (other-window 1) - (org-journal-open-current-journal-file)))) + (org-roam-dailies-goto-today)))) (defun mmk2410/tab-bar-run-journal () (interactive) (mmk2410/tab-bar-switch-or-create "Journal" - #'org-journal-open-current-journal-file)) + #'org-roam-dailies-goto-today)) (defun mmk2410/tab-bar-run-projects () (interactive) @@ -91,5 +91,4 @@ ("q" nil)) (provide 'mmk2410-tab-bar-helpers) - -;;; tab-bar-helpers.el ends here +;;; mmk2410-tab-bar-helpers.el ends here