Starting out with org-roam

This commit is contained in:
Andrea Ciceri 2021-10-18 13:58:48 +02:00
parent 741d9b5b6a
commit b22971dbd5
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
9 changed files with 96 additions and 11 deletions

View file

@ -2,17 +2,36 @@
:init
(setq fill-column 80)
(require 'org-protocol)
:custom
(org-startup-folded 'fold)
:hook
((org-mode . refill-mode)
((org-mode . auto-fill-mode) ;refill-mode breaks org headings
(org-mode . (lambda () (org-superstar-mode 1)))
(org-mode . prettify-symbols-mode)))
(use-package org-download
:hook
((org-mode . (lambda () (setq-local org-download-image-dir "~/roam/images/")))))
(use-package org-roam
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory (file-truename "~/roam/"))
(org-roam-graph-executable "dot")
(org-roam-db-location (file-truename "roam/org-roam.db"))
(org-roam-capture-templates
'(
("i" "incremental" plain
#'org-roam-capture--get-point
"${body}\n%?" ;; this reads from
; "%i%?"
:empty-lines-before 1
:file-name "web/${slug}"
:head "#+title: ${title}\n#+roam_key ${ref}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
:unnarrowed t)
("r" "roam-ref" plain #'org-roam-capture--get-point "%i%?" :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}"))))
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph)
@ -22,7 +41,7 @@
("C-c n j" . org-roam-dailies-capture-today))
:config
(org-roam-db-autosync-mode)
;; If using org-roam-protocol
(require 'org-roam-protocol))
(require 'org-roam-protocol)
(provide 'config-org)