From 162623fcba2d040f21f67f2ae55a120777a158a1 Mon Sep 17 00:00:00 2001 From: Lars Tveito Date: Fri, 1 Jan 2021 23:04:34 +0100 Subject: [PATCH] Add org roam setup --- init.org | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/init.org b/init.org index ed01750..c75cc80 100644 --- a/init.org +++ b/init.org @@ -207,6 +207,8 @@ olivetti ; Minor mode for a nice writing environment org ; Outline-based notes management and organizer org-bullets ; Show bullets in org-mode as UTF-8 characters + org-roam ; Roam Research replica with Org-mode + org-roam-server ; Org Roam Database Visualizer paredit ; minor mode for editing parentheses pdf-tools ; Emacs support library for PDF files projectile ; Manage and navigate projects in Emacs easily @@ -600,6 +602,51 @@ (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) #+END_SRC +*** Org Roam + + Trying out [[https://www.orgroam.com/][org-roam]] for organizing notes. + + #+begin_src emacs-lisp + (setq org-roam-directory "~/Dropbox/org-roam") + (add-hook 'after-init-hook 'org-roam-mode) + + (setq org-roam-dailies-capture-templates + '(("d" "dagbok" entry + #'org-roam-capture--get-point + "\n* %?" + :file-name "daily/dagbok-%<%Y-%m-%d>" + :head "#+title: Dagbok %<%Y-%m-%d>\n") + + ("r" "reading" entry + #'org-roam-capture--get-point + "\n* %?" + :file-name "daily/reading-%<%Y-%m-%d>" + :head "#+title: Reading %<%Y-%m-%d>\n"))) + + (with-eval-after-load 'org-roam + (define-key org-roam-mode-map (kbd "C-c r l") 'org-roam) + (define-key org-roam-mode-map (kbd "C-c r d") 'org-roam-dailies-today) + (define-key org-roam-mode-map (kbd "C-c r f") 'org-roam-find-file) + (define-key org-roam-mode-map (kbd "C-c r g") 'org-roam-graph) + + (define-key org-mode-map (kbd "C-c r i") 'org-roam-insert) + (define-key org-mode-map (kbd "C-c r I") 'org-roam-insert-immediate)) + #+end_src + + #+begin_src emacs-lisp + (setq org-roam-server-host "127.0.0.1" + org-roam-server-port 8080 + org-roam-server-authenticate nil + org-roam-server-export-inline-images t + org-roam-server-serve-files nil + org-roam-server-served-file-extensions '("pdf" "mp4" "ogv") + org-roam-server-network-poll t + org-roam-server-network-arrows nil + org-roam-server-network-label-truncate t + org-roam-server-network-label-truncate-length 60 + org-roam-server-network-label-wrap-length 20) + #+end_src + ** Interactive functions <>