* Revert "(fix): `org-roam-descendant-of-p` bug on Windows (#2089)"
This reverts commit 97a342fd3f.
Reason:
It seems that the `file-in-directory-p` function proposed in #2089 is provided only for
*physical directories*, does not work as we would like with *symlinked directories*.
It dereferences all the symlinks in its path, and previously seemed related paths
cease to be such.
Because of this, such notes are ignored and not indexed, although they
were indexed earlier.
On Windows, `file-truename` and `directory-file-name` downcase driver
label: "C:/" => "c:/", while `expand-file-name` keep the case
unchanged. If `org-roam-directory` use upper case driver label, `org-roam-descendant-of-p` will alway return `nil`. Fix by only using `file-truename` in the function.
When dynamic binding `org-roam-directory` to the "dailies/"
subdirectory also bind `org-roam-dailies-directory` to "./" to prevent
invalid expansions in user-defined hook functions.
Fixes#2070
This is an extension of PR #2028 [1] by @astery, where the `keys`
argument was added to `org-roam-dailies--capture` `org-roam-dailies-capture-today`.
I extended this argument to also be available in other built-in dailies
functions, as I didn't see any reason why not and it results in my opinion in
more consistent behaviour.
The rationale is the same as in #2028: Allow users to add keybindings (or in my
case hydras) to calls of org-roam-dailies functions with specific template keys,
thus circumventing the selection screen.
So far it seems to work for me. I have only one pet-peeve about
the interface, if the user starts adding keys to all their goto-functions, they
might add
(org-roam-dailies-goto-date nil "<key>")
Then the key-string will be interpreted as the value for `prefer-future` and
since it's non-nil, there won't be an error.
[1] https://github.com/org-roam/org-roam/pull/2028
This name will better reflect the current purpose of the property. At
the beginning of the v2 it would only trigger for the new nodes (hence
:if-new), but through the development it's no longer the case, though
the behavior various from each type of the target.
As for now, this will be soft deprecated and won't be strictly enforced
at the user.
(condition-case nil
(test)
(t nil))
Is a construct that's only available starting from Emacs 27. Since
Org-roam supports Emacs 26, gotta use what's given.
Note: ignore-errors isn't exactly the same as the construct above from
Emacs 27. Compare to ignore-errors to would trap all possible signals,
while ignore-errors will only trap "error" signals. This, however,
shouldn't affect us in case of this refactoring.
Fixes#1777.
Detangle the codebase and change how dependencies are resolved to
allow the package to better modularize and load itself without
introducing circular dependencies, especially when autoloads involved.