* (test): add "org-roam--list-files-search-globs"
* (feat): extract rg-command builder function from unlinked-references
Users can now advice this command to tweak the flag pased to ripgrep.
The current one have been expanded to long-form.
It's a follow up to the fix about shell quoting
* (docs): update CHANGELOG
* (fix)capture: fill-template preserve whitespace content
Preserve the whitespace content given in the capture template, by
caching it and then appending it to the output template. For
Org-capture's purposes, we need to separately ensure that a newline is
present. Adds tests to the various helper functions to illustrate changes.
Addresses #2115
Special care is taken not to move the point if the original point is no
longer the same (i.e. the user moves the cursor after calling the
capture, but before finalizing it). Fixes#2108.
Let's assume we're evaluating the following region:
```elisp
(org-roam-capture-
:node (org-roam-node-create :title "Org Roam Homepage")
:info '(:ref "https://orgroam.com")
:props '(:immediate-finish nil))
```
Prior to this commit, if you did not require "org-roam-protocol" then
`org-roam-capture-` would ignore the `:info '(:ref
"https://orgroam.com")` parameter. Once you required
"org-roam-protocol" then the callback hooks that process `:info`'s
`:ref` will fire regardless of whether it comes from org-roam-protocol.
After this commit, you no longer need to require "org-roam-protocol" to
ensure that you capture an `:info`'s `:ref`.
Why is this useful? When I'm reading through my elfeed RSS feed, I want
to capture an article. I could use the org-roam-protocol to do this,
but that seems a bit unnecessary given that I'm already in Emacs.
Closesorg-roam/org-roam#2078
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
Revert to a simplified `org-roam-node-display-template`, because on
non-vertical completion frameworks it looks and behaves strangely. To
restore the original default behaviour, set
`org-roam-node-display-template` in your Emacs configuration as such:
(setq org-roam-node-display-template
(concat "${title:*} "
(propertize "${tags:10}" 'face 'org-tag)))
Adds two customizable variables: org-roam-db-extra-links-elements and
org-roam-db-extra-links-exclude-keys, which govern which elements are to
be considered for link parsing by Org-roam.
Also added sane defaults to org-roam-db-extra-links-exclude-keys.
Support caching the new Org 9.5 citations.
Because citations now has first-class support, and are treated
differently from links, they are now cached in their own table.
Org-ref citations, instead of being stored in the links table, are now
stored in the citations table instead.
To use a citation as a ROAM_REF, use the `@citeKey` syntax
Previously when ROAM_REFS is non-empty, but the refs are invalid, this
will cause an empty SQL expression and crash the db caching. This fixes
that scenario.
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.
Previously, if org-roam-capture- would be triggered for an existing node
it would just move the point to the beginning of the node, ignoring the
target from the :if-new part of the template.
This patch will now also run the :if-new part of the template for
existing nodes, just like it does right now in case of daily
templates (which happened to be never recognized as existing nodes
during the capture process).
Current, when fetching file level org tags (from the #+filetags property), multiple tags are split based on the default `split-string` separator. This is incorrect because the org documentation says that multiple file-level tags should be separated by `:` (like headline level tags). This results in a improper splitting (aka no split) of the tag string into multiple tags. This leads to the inability to delete tags that are there.
Similarly, when writing multiple filetags, the tags are joined by " " instead instead of ":" as mentioned in the org docs. This leads to improperly added tags where newly added tags would not be recognized by org.
This PR fixes both problems, parsing is done by string splitting on ":" (with the `OMIT-NULLS` parameter set to true so you don't get a null values from the fact tags start and end with `:`). Joining multiple tags is now done with the `org-make-tag-string` function instead of manually joining on space. These changes result in the ability to add and remove file level tags such that the resulting value of the `#+filetags` property is a valid tag string.