* (feat): Support file-property drawers
Add support for file-property drawers in property extraction. This means
the following is now supported:
:PROPERTIES:
:ROAM_ALIAS: alias
:ROAM_TAGS: tag1 tag2
:END:
Follow on to #1345.
The discussion in the Slack thread further clarified what was exactly
confusing for a beginner reader of this Getting Started. When a user is using
the built-in completion (no ivy, no ido), then `org-roam-find-file` does not
immediately show any files -- instead, the user has to press TAB. This is not
explicitly mentioned.
Previously we had set `org-capture-link-is-already-stored` to `t` in
org-roam captures, because org-roam-protocol stores links. This
prevented regular captures from utilizing the %a element in the
templates.
Instead, only set `org-capture-link-is-already-stored` in the
org-roam-protocol capture command.
Fixes#1341.
When `org-roam-directory` doesn't end with trailing slash and
`org-roam-index-file` contains relative filename, absolute path
to org-roam index file returned by `org-roam--get-index-path` is
malformed and invalid.
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
The rename file advice is passed relative file names: e.g. "foo.org" ->
"bar.org". This was not accounted for, and paths in the Org-roam
database are supposed to be absolute paths. This caused the storing of
relative paths in the Org-roam database, which were then never purged.
Fixes#1304
Finding an Org-roam file that does not exist yet triggers the find-file
hook, resulting in an Org-roam buffer update, attempting to show the
file. However, if the file does not yet exist, attempts to show the file
will not work, since the database does not contain the relevant
information yet.
This bug has always been present, but was only recently made visible by
the code cleanups in #1284.
Now, we ensure that the file has been processed by the database before
attempting to re-display the buffer.
Fixes#1297
Every file has a title when saved into the database, so this function is
redundant in most cases (e.g. in org-roam-buffer, where backlinks are
fetched from the database).
* (feat): add `org-roam-db-update-method`
Add `org-roam-db-update-method`, which can be one of two choices:
1. `immediate`: the cache is updated upon file changes
2. `idle-timer`: Marks the org-roam database as dirty. If Emacs idles
for some seconds, the Org-roam cache is updated. This is the default,
and current behaviour.
The idle method makes for a smoother editing experience, but some
inconsistencies can be faced.
* org-roam-update-db-idle-seconds -> org-roam-db-update-idle-seconds