This PR enables the long-awaited nested-captures.
1. Adds a hook to org-capture-prepare-finalize-hook, which installs org-roam-capture--finalize into org-capture-after-finalize-hook if the capture is an Org-roam capture. This function contains key functionality for Org-roam to Do The Right Thing after specific interactive functions, such as finding the file, or inserting a link.
2. A patch for org-capture-finalize. Specifically, we make org-capture-plist valid during org-capture-finalize.
3. Many hacks that were originally in place are now replaced with nicer alternatives.
Co-authored-by: Leo Vivier <zaephon@gmail.com>
Before this patch all hash-sums were computed over the files or
buffers content. For encrypted files this means that we first have
decrypt the file before we can compute the hash-sum. So when the
cache get's updated all gpg files need to be decrypted which is a very
expensive operation and nearly defeats the purpose of having a cache
in the first place (for gpg files).
This changes the computation of hash-sums for gpg encrypted files.
Instead of the content the raw files on disk will be read.
This shouldn't interfere with the current use of hashes.
There is one ugly (but otherwise inconsequential) ward, though.
For open buffers of to be gpg encrypted files we need to compute the
hash sum over the contents as well. This is because there is
no (easy) way to get the encrypted version. The consequence is that
that buffers file will be rehashed again (then using the bytes on
disk). But all other non changed gpg files will only be hashed once,
as desired.
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
Fixes#956.
The extraction of links rely on appropriate regexp being set for
outline-mode, to determine the outline information. Because the
information were extracted in a temporary buffer, the outline regexp was
not set. This corrects for that, but probably adds significant
extraction time.
* (fix): Check if link-description is empty prior to inserting in db
Caused problems with plain links, i.e., those not framed by
brackets (e.g. `file:foo.org` or `id:$uuid`).
* (feat): Add customize settings to `org-roam-capture-templates`
Declare `org-roam-capture-templates` with `defcustom` and update the
docstring.
Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
7f56df7f4d introduced the delta symbol in the
db-rebuild message to make it clearer the the db was updated as opposed to
being completely rebuilt.
However, the unicode symbol used, U+1D6AB, which is the mathematical, bold
variant of the Greek letter is not present in many fonts. Switching to
U+0394, the base Greek letter, is better for compatibility.
Instead of storing titles as a list within in the Org-roam cache, e.g.
file, ("title1" "title2"). We normalize it and store it as:
file, "title1"
file, "title2"
This adds support for all sorts of ref links (http, https, and any
custom link types). If the ref is not a file or org-ref citation link,
the full link path is used.
Closes#744.
Previously, if the new file is no longer an Org-roam file, links will
not be fixed. The current behaviour is now to perform the link fixes as
long as the old file as an Org-roam file.
Closes#893
Links like /ssh:me@host:/ cause emacs to lock up asking for the password repeatedly due to using file-exists-p in a function passed to font lock.
Co-authored-by: Herbert Jones <herbert@hj-desktop.home>
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>