`org-roam-doctor` provides a diagnostic tool for checking an Org-roam
file for things that are broken. Currently implemented is a check for
broken links, and methods to fix them. The checker is designed to be
extensible.
* (feat): simplify format of `INFO` for find-ref
The format of the `INFO` argument of `org-roam-find` has been simplified, thanks
to the split of `type` and `ref` in the db permitted by #547.
The non-interactive behaviour of `org-roam-find-ref` has also been isolated
into `org-roam--find-ref`. Even if it makes us repeat ourselves a bit, it
avoids having to nil the interactive argument just to get the non-interactive
us, which I think is better syntax.
* (feat): implement get-ref-path-completions filtering
* Ensure that multicite links are correctly split
org-ref multi-citations are handled by "cite:key1,key2". In the org-roam databases this was
previously stored as a single "cite" link to the (non-existing) key "key1,key2". This means that
cite backlinks and cite graph behaviour does not work correctly for these links.
This fix will split any cite links with a comma into separate links to each individual ref
* Refactor with ->>
* Refactor to use org-ref-split-and-strip-string instead
* Update changelog with #545
* (fix): optimize processing
* (fix): avoid repetition
Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
* (feat) cond display relative subdir in title for selection
A title can now be constructed as ‘subdir/file-title’ where ‘subdir’ is the
sub-directory relative from ‘org-roam-directory’.
When ‘org-roam-title-include-subdirs’ is non-nil, ‘org-roam--extract-titles’
now outputs titles in this format.
* (fix) improve docstrings
* (feat) add var for modifying subdir-separator
* (fix) nitpick docstring
* (doc) document subdir creation in templates with :file-name
* (feat) make subdir-format accept a function
* (fix) respect docstring one-line-description
* (fix) address checkdoc errors
* (fix) also add subdirs when db--update-titles
* (feat) improve modularisation
`org-roam--extract-titles' is now reverted to its default definition, i.e. it
doesn’t format the titles. In its stead,
`org-roam--extract-and-format-titles' is created to both extract the titles
and process all of them with `org-roam--format-title', which is a much better
way to do this.
* Refactor with ->>
* Refactor with let*
Pretty sure I got confused because I thought I needed to use the result of the
db-queryr.
* Remove useless ->>
In #470, the `and` clause was removed, so `org-roam--org-roam-file-p`
returns `t` on `foo.org~` backup files. This PR adds that back in.
In addition, the `after-save-hook` function was not checking for whether
the file was within the org-roam system, which meant files from outside
`org-roam` would also be added into the database. This PR adds a guard
clause.
* (feat) remove user-error for org-roam-insert
Closes#477.
* (fix) use absolute path when buffer has no associated file
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
Beyond just an extraction, this is also a simplification. It removes two
variables: `org-roam-date-filename-format` and
`org-roam-date-title-format`, in favour of directly specifying them in
the `org-roam-dailies-capture-templates`.
`org-roam--file-for-time` is also vastly simplified to use org-capture's
default time expansion utilities, by setting the capture template's
`:default-time` appropriately.
Instead of using a global variable to check for a existing capture,
leverage the :org-roam plist property of the buffer-local variable
`org-roam-capture-current-plist`.
This prevents a lockout if the capture buffer is killed
Split functionality related to the org-roam-buffer into its own
feature/file.
Introduce `org-roam-buffer-prepare-hook' to allow customizations of the
org-roam-buffer content.
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
Change function name org-roam--setup-buffer org-roam--set-up-buffer.
Warn user and default to 'right when org-roam-buffer-position is
an invalid position.
Make better use of pcase to avoid repeating code.
* Allow placement of the sidebar on top or on bottom
* Add "let_sidebar_be_on_top_or_bottom" to the changelog
* Remove an unnecessary progn and replace an if with a pcase
As requested by jethrokuan in https://github.com/jethrokuan/org-roam/pull/380
comments.
This change makes `org-roam-open-at-point` non-interactive and adds it to
`org-open-at-point-functions`. As a consequence, `org-open-at-point` will try
to visit an Org-roam link or preview text, before falling back to the default
behavior of Org mode.
Fixes#312.