Move org related binds under C-c o keymap

Check for sqlite3 executable before enabling org-roam
This commit is contained in:
Evie Litherland-Smith 2024-07-24 10:05:15 +01:00
parent d62c620880
commit fb2329bfa6

86
init.el
View file

@ -488,7 +488,7 @@
(use-package org-capture
:after org
:bind ("C-c n" . org-capture)
:bind ("C-c o n" . org-capture)
:custom (org-capture-templates
'(("t" "TODO" entry
(file+olp "tasks.org.gpg" "Inbox")
@ -497,51 +497,53 @@
(file+olp "calendar/email.org.gpg" "Inbox")
"%i" :immediate-finish t))))
(use-package org-roam
:if (package-installed-p 'org-roam)
:after org
:defines org-roam-directory
:functions org-roam-db-autosync-mode
:bind (("C-c r i" . org-roam-node-insert)
("C-c r f" . org-roam-node-find)
("C-c r n" . org-roam-capture)
("C-c r j" . org-roam-dailies-capture-today)
("M-g j" . org-roam-dailies-goto-today)
("M-g C-j" . org-roam-dailies-goto-date)
:map org-mode-map
("C-c r b" . org-roam-buffer-toggle))
:custom
(org-roam-directory (expand-file-name "roam" org-directory))
(org-roam-completion-everywhere nil)
(org-roam-node-display-template (concat
"${title:*} "
(propertize "${tags:24}" 'face 'org-tag)))
(org-roam-capture-templates '(("d" "default" plain "%?"
:target (file+head "${slug}.org" "#+title: ${title}\n")
:unnarrowed t)))
:config
(mkdir org-roam-directory t)
(add-to-list 'display-buffer-alist
'("\\*org-roam\\*"
(display-buffer-in-side-window)
(side . right)
(slot . 0)
(window-width . 0.33)
(window-parameters . ((no-delete-other-windows . t)))))
(org-roam-db-autosync-mode +1))
(if (executable-find "sqlite3")
(use-package org-roam
:if (package-installed-p 'org-roam)
:after org
:defines org-roam-directory
:functions org-roam-db-autosync-mode
:bind (("C-c o r i" . org-roam-node-insert)
("C-c o r f" . org-roam-node-find)
("C-c o r n" . org-roam-capture)
("C-c o r j" . org-roam-dailies-capture-today)
("M-g j" . org-roam-dailies-goto-today)
("M-g C-j" . org-roam-dailies-goto-date)
:map org-mode-map
("C-c o r b" . org-roam-buffer-toggle))
:custom
(org-roam-directory (expand-file-name "roam" org-directory))
(org-roam-completion-everywhere nil)
(org-roam-node-display-template (concat
"${title:*} "
(propertize "${tags:24}" 'face 'org-tag)))
(org-roam-capture-templates '(("d" "default" plain "%?"
:target (file+head "${slug}.org" "#+title: ${title}\n")
:unnarrowed t)))
:config
(mkdir org-roam-directory t)
(add-to-list 'display-buffer-alist
'("\\*org-roam\\*"
(display-buffer-in-side-window)
(side . right)
(slot . 0)
(window-width . 0.33)
(window-parameters . ((no-delete-other-windows . t)))))
(org-roam-db-autosync-mode +1))
(use-package org-roam-dailies
:after org-roam
:custom
(org-roam-dailies-directory "./")
(org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+datetree "journal.org.gpg" week)))))
(use-package org-roam-dailies
:after org-roam
:custom
(org-roam-dailies-directory "./")
(org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+datetree "journal.org.gpg" week))))))
(use-package org-agenda
:after (org appt)
:bind (("C-c a" . org-agenda))
:bind (("C-c o a" . org-agenda)
("C-c o C-a" . org-agenda-list))
:hook (org-agenda-finalize . org-agenda-to-appt)
:custom
(org-agenda-span 'day)