Commit graph

594 commits

Author SHA1 Message Date
Jethro Kuan
9ee591f7a4
(fix): fix possibility of multiple idle timers (#1042)
This change ensures that `org-roam--file-update-timer` has only one
instance per Emacs instance. Fixes #1037
2020-08-16 12:08:19 +08:00
Charl P. Botha
2081e1268a
(feat): add org-roam-enable-headline-linking (#1030)
When disabled, Org-roam will not attempt to cache headlines, and will not create IDs.

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-08-13 11:18:06 +08:00
Charl P. Botha
11aac39a1b
(feat): propagate file changes on idle-timer (#1032)
Queue up file updates, to be processed on idle timer. This makes saving files more responsive for large files.

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-08-12 17:07:27 +08:00
Simon Manning
e58ec84b7c
(fix): Require org-macs in org-roam-db to fix undefined macro (#1033)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-08-11 21:22:54 +02:00
Jethro Kuan
7813b1fe1f
(internal): fix CI for compat functions (#1031)
Following the advice from the coding conventions from the Emacs manual,
we preface the compatibility functions with the org-roam namespace.
2020-08-12 00:04:15 +08:00
Jethro Kuan
22006be751
(docs): set org-roam-db-location with multiple org-roam-directories (#1027)
Fixes #1025
2020-08-11 13:51:29 +08:00
odomanov
0318983cac
(feat): cache all link-types (#1009)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-08-10 15:59:02 +08:00
Jethro Kuan
9753ee451f
(fix): fix fuzzy link completions (#1022) 2020-08-10 15:38:17 +08:00
Jethro Kuan
8c442a72de
(fix): fix fuzzy-links opening for file (#1023) 2020-08-10 14:31:10 +08:00
Jethro Kuan
0ed9057a87
(feat): tag completion via capf (#1017) 2020-08-09 21:49:06 +08:00
Jethro Kuan
5d02e6407b
(fix): remove save-buffer on id creation (#1018)
This can trigger a lot of hooks, which may not be desirable.
2020-08-09 21:03:27 +08:00
Jethro Kuan
4fa966d366
(feat): fuzzy link auto-replacement (#1011)
Fuzzy links can now be auto-replaced on navigation and on file-save, if
there is already a match. This is now the default behaviour, controlled
via `org-roam-auto-replace-fuzzy-links`.
2020-08-09 12:20:02 +08:00
Jethro Kuan
6d03e7626d
(fix): save-restriction for db update (#1016) 2020-08-09 12:06:34 +08:00
Leon
c437052b4b
(docs): update url of org-fc (#1012)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-08-09 11:55:07 +08:00
Leo Vivier
a26c262048
(fix): Widen before updating file (#1014) 2020-08-09 00:24:12 +02:00
Jethro Kuan
4f3668a1e3
(fix): fix get-backlinks failing for unescaped strings (#1008)
Revert to emacsql vector format to retain escaping. Fixes #1007.

Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
2020-08-07 16:06:24 +08:00
Jethro Kuan
09b5357a94
(docs): remove readthedocs build (#1006)
This has long been superceded by the internal and published online manual
2020-08-06 11:15:14 +08:00
Jethro Kuan
444eedc799
(internal): remove with-template-error wrapper (#1004)
This has caused more confusion than it has helped.
2020-08-06 10:51:24 +08:00
Jethro Kuan
da6fdd7542
(feat): support fuzzy links (#910) 2020-08-05 20:52:27 +08:00
Leo Vivier
f18ecd1fc3
(feat): Implement new face-toggle for id-links (#999)
Also fix a typo.
2020-08-04 15:26:51 +02:00
targit
f206b5bbf9
(fix): skip unreadable files while building the cache (#995)
When using gpg encrypted files it might happen (intended) that on a
certain machine there is no key to decrypt that file.  Currently an
error of type 'file-error' will be raised and the cache building
process will be aborted.  So in a certain sense org-roam will not
be functional in that case.  Furthermore, when the the cache building
process is run from the emacs initialisation it will come to a halt as
well and the user will be left with a halfworking emacs instance.

This patch changes the behaviour to just skipping over offending files
while removing them from the db at the same time.  Here an offending
file is any file that cannot be read for indexing.  As it stands this
case only works reliably for the case of missing gpg keys.

An error buffer will still show up and be prominently displayed,
besides a log to the message buffer.

Implementation note: This io error will only be caught during the
first part of the cache rebuilding ("files and headlines").  If such
an error would occur during the second part ("rebuild the rest")
another (more severe) cause might be the problem and the user better
be informed the hard way (i.e. the same behaviour as before).
2020-08-03 16:58:22 +08:00
Leo Vivier
30fab7bcc4
(feat): Add toggle for custom-faces for Org-roam links (#997)
* org-roam.el (org-roam-link-use-custom-faces): New toggle
(org-roam--file-link-face): Refactor for new toggle
2020-08-02 18:27:38 +02:00
Leo Vivier
76d2e3f6b4
(feat): Simplify org-roam-store-link (#994)
* (feat): Simplify org-roam-store-link

Drop the wrapper, and refactor as an org-store-link function.
2020-08-01 08:02:57 +02:00
Daniel Gomez
8881c9732b
(fix) Change Emacs date to 1976 (#993)
cf. https://en.wikipedia.org/wiki/Emacs
2020-07-31 15:29:59 +02:00
Jethro Kuan
0aa0a7c05a
(doc): Add target audience section (#990) 2020-07-31 02:15:42 +08:00
Jethro Kuan
ea4bfbb55d
(fix): fix face-related functionality (#988)
- Ensure `org-roam-store-link-file` has no effect if org-roam-mode is
disabled
- Remove custom styling for ID links when org-roam-mode is disabled
2020-07-30 09:56:13 +08:00
Jethro Kuan
0443351800
(internal): move faces into own file (#987) 2020-07-30 09:12:56 +08:00
Leo Vivier
6345d0c22e
(feat): Protect region targeted by org-roam-insert (#974)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-07-27 20:16:39 +02:00
Leo Vivier
f2c1500beb
(doc): Fix docstring (#979) 2020-07-27 11:43:23 +02:00
Jethro Kuan
89e9121f26
(release): Org-roam v1.2.1 (#975) 2020-07-27 01:03:35 +08:00
Mykhailo Shevchuk
c536fd4f2e
(fix): check if path is remote before using file-truename (#970)
this prevents cache builds from stalling, on paths that point to remote files
2020-07-27 00:30:54 +08:00
Jethro Kuan
20f876aa6b
(feat): enable nested captures (#966)
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>
2020-07-27 00:21:41 +08:00
Mykhailo Shevchuk
863ae2427e
(feat): add customize settings for capture templates (#968)
adds ability to customize capture templates using the Customize interface for:

1. org-roam-capture-ref-templates
2. org-roam-dailies-capture-templates
3. org-roam-capture-immediate-template
2020-07-26 15:15:56 +08:00
Jethro Kuan
379d5e4770
(doc): Add Andreas to backers (#969) 2020-07-25 16:33:36 +08:00
Jethro Kuan
4d992ce9e3
(doc): add debian/ubuntu installation instructions (#965)
Addresses #964
2020-07-23 22:46:21 +08:00
targit
1d9968bf69
Make the db caching more efficient for gpg encrypted files (#963)
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>
2020-07-23 22:36:57 +08:00
Leo Vivier
650744adc7
(doc): Create ‘Getting Help’ (#961)
* (doc): Create ‘Getting Help’

* README.md: Add ‘Getting Help’

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-07-22 19:06:54 +02:00
Jethro Kuan
d099f9bef9
(fix): enable org-mode in temp buffers (#957)
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.
2020-07-22 20:59:35 +08:00
Leo Vivier
b5f3f04318
(doc): Add an FAQ section (#959)
* README.md: Create FAQ section and mention `C-M-j` for `ivy`
2020-07-22 09:07:49 +02:00
endgame
c20c8f9a0a
(fix): Check sqlite3’s executability using boundp (#954)
Fixes #837. The existing merged fixes do not actually work, because fboundp tests for a function.
2020-07-21 15:51:43 +08:00
Jethro Kuan
c24fb51b03
(feat): cache entered template variables (#952)
Fixes #951.
2020-07-20 22:14:21 +08:00
Jethro Kuan
80390b5a84
(fix): fix display of preview content (#950)
Don't modify line-breaks in preview content. Closes #630.
2020-07-19 13:33:01 +08:00
Jethro Kuan
eb7ee0ef6c
(docs): add docs on notes versioning (#949) 2020-07-19 12:37:53 +08:00
Jethro Kuan
fb5beeb14d
(docs): clarify org-roam-completion-system (#948) 2020-07-19 12:26:00 +08:00
Jethro Kuan
10e91a88c1
(docs): make explicit need to set org-roam-directory early (#946) 2020-07-18 18:04:52 +08:00
Jethro Kuan
4cdab9103f
(fix): fix possible nil dbs on update operations (#945)
Addresses #942
2020-07-18 13:09:40 +08:00
Leo Vivier
4ec4e60358
(doc): Add SVG source for logo (#943) 2020-07-16 10:20:42 +02:00
Leo Vivier
7a4b15fd36
(fix): Check if link-description is empty prior to inserting in db (#927)
* (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`).
2020-07-11 23:42:05 +02:00
Mykhailo Shevchuk
f9fea29c44
(feat): Add customize settings to org-roam-capture-templates (#924)
* (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>
2020-07-11 20:48:10 +02:00
Leo Vivier
569aeb84ed
(fix): Change symbol used for delta (#925)
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.
2020-07-11 20:19:55 +02:00