Setup org-roam
This commit is contained in:
parent
8aac912f1f
commit
9b2bdd4e34
36
config.org
36
config.org
|
@ -12,6 +12,7 @@
|
||||||
- [[#agenda-setup][Agenda setup]]
|
- [[#agenda-setup][Agenda setup]]
|
||||||
- [[#journal][Journal]]
|
- [[#journal][Journal]]
|
||||||
- [[#org-ids][Org IDs]]
|
- [[#org-ids][Org IDs]]
|
||||||
|
- [[#roam][Roam]]
|
||||||
- [[#doom-specific][Doom specific]]
|
- [[#doom-specific][Doom specific]]
|
||||||
|
|
||||||
* Misc
|
* Misc
|
||||||
|
@ -230,6 +231,41 @@ links to work:
|
||||||
(add-to-list 'org-modules 'org-id)
|
(add-to-list 'org-modules 'org-id)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Roam
|
||||||
|
|
||||||
|
Setup for [[https://github.com/jethrokuan/org-roam][org-roam]].
|
||||||
|
|
||||||
|
First, set a directory where =org-roam= will index things.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq org-roam-directory (expand-file-name "notes/" org-directory))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Customize the capture templates:
|
||||||
|
|
||||||
|
- the first one is [[https://github.com/jethrokuan/org-roam/blob/772505ba70c073ebc7905c4fcb8b9cc3759c775a/org-roam-capture.el#L81][the default one]], I just removed the timestamp from the file
|
||||||
|
title.
|
||||||
|
- the second one I use to create new entries about website links, blog posts,
|
||||||
|
articles... The ~%x~ in the template is replaced by the content of my X
|
||||||
|
clipboard, so I just have to copy the website URL before capturing it.
|
||||||
|
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(after! org-roam
|
||||||
|
(setq org-roam-capture-templates
|
||||||
|
'(("d" "default" plain (function org-roam-capture--get-point)
|
||||||
|
"%?"
|
||||||
|
:file-name "${slug}"
|
||||||
|
:head "#+TITLE: ${title}\n"
|
||||||
|
:unnarrowed t)
|
||||||
|
("w" "website" plain (function org-roam-capture--get-point)
|
||||||
|
""
|
||||||
|
:file-name "websites/${slug}"
|
||||||
|
:head "#+TITLE: ${title}
|
||||||
|
#+ROAM_KEY: %x\n"
|
||||||
|
:unnarrowed t))))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Doom specific
|
** Doom specific
|
||||||
|
|
||||||
Doom replaces the default tab behavior on headings, this restores the default
|
Doom replaces the default tab behavior on headings, this restores the default
|
||||||
|
|
3
init.el
3
init.el
|
@ -138,7 +138,8 @@
|
||||||
nix ; I hereby declare "nix geht mehr!"
|
nix ; I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
(org ; organize your plain life in plain text
|
(org ; organize your plain life in plain text
|
||||||
+journal)
|
+journal
|
||||||
|
+roam)
|
||||||
;;perl ; write code no one else can comprehend
|
;;perl ; write code no one else can comprehend
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
|
|
Loading…
Reference in a new issue