Instead of implementing our own templating system, we abuse org-capture's templating system. We add 2 additional properties:
- :head: a starting template that goes at the beginning of the file.
- :file-name: a string that expands to the file name
The templates are customizable at `org-roam-capture-templates` and `org-roam-ref-capture-templates`.
Add 2 custom handlers:
1. roam-file?file=path: this simply opens the file at path in Emacs.
2. roam-ref?ref=ref&template=roam-template&title=title&...: attempts to open a roam note with a given ROAM_KEY. If the note doesn't exist, create one. Else, open it.
All org-roam related information will now be stored in the database. Henceforth, the cache needs to be built synchronously once (via `M-x org-roam-build-cache`), which is then incrementally updated.
We emulate org-protocol, and advise server-find-files, stripping the
roam protocol from the filename. This reduces the setup required to
open `roam://` links.
* (feature): add custom font styling for org-roam links
This adds 'org-roam-link-face. When org-roam-mode is on, all roam
links take this face. By default, it is exactly the same as 'org-link,
and would require styling.
* update docs
Makes org-roam-mode a global minor mode. This mode adds an advice to find-file-function, which decides whether to turn on the local post-command-hook and after-save-hook.
It also advices delete-file and rename-file to ensure cache consistency. Also fixes a bug introduced with #142
This allows for more flexible naming of files. Now filename defaults
to yyyymmddhhmmss_title_here.org. Also, remove
`org-use-timestamp-as-filename`, and change it to
`org-roam-filename-noconfirm` to better describe what it is doing.s