Commit graph

319 commits

Author SHA1 Message Date
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
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
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
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
Matthew Ryall
1574e0d351
Exclude backup files from renaming advice (#915)
Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
2020-07-10 23:18:33 +02:00
Leo Vivier
fffef6711f
(fix): Update rename-file-advice to new schemata (#917)
Caused by #908.
2020-07-10 19:59:07 +02:00
Leo Vivier
ef23f507ec
(fix): Adapt get-title-or-slug to new schemata (#916)
Follow-up to #908.
2020-07-10 19:34:12 +02:00
Jethro Kuan
efba3c2bf0
(internal): normalize titles in database (#908)
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"
2020-07-10 14:36:54 +08:00
Leo Vivier
6770c3eaf5
(feat): Implement basic output for find-ref with C-u arg (#907) 2020-07-10 08:24:04 +02:00
Leo Vivier
b8aa5c1f23
(feat): Improve interactive format for ref completions (#906) 2020-07-10 11:47:07 +08:00
Jethro Kuan
d77f897400
(feat): support more ref links (#900)
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.
2020-07-08 12:29:06 +08:00
Jethro Kuan
9f7ed4353c
(feat): add org-roam-random-note (#898) 2020-07-07 14:45:28 +08:00
Jethro Kuan
aedfca8de2
(fix): rename links as long as old file is Org-roam file (#894)
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
2020-07-06 21:34:52 +08:00
Herbert Jones
3aff6b2be7
(bugfix): prevent file-exists-p opening tramp links (#885)
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>
2020-07-05 22:36:35 +08:00
Jethro Kuan
610d4ced85
(internal): save-match-data on outline extraction (#871) 2020-06-27 21:26:03 +08:00
Jethro Kuan
2f13d1fe64
(internal): fix expand-file usage in org-roam--expand-links (#866) 2020-06-26 14:57:27 +08:00
Jethro Kuan
79c75ac174
(feat): Add header level to backlinks buffer (#863)
adds the outline hierarchy to the backlinks buffer
2020-06-25 12:40:22 +08:00
Jethro Kuan
220f395c1f
(feat): add org-roam-find-file-immediate (#852)
Addresses #852.
2020-06-22 16:19:27 +08:00
Jethro Kuan
76b2ac3460
(bugfix): fix tag extraction for symlinked directories (#857)
* (bugfix): fix tag extraction for symlinked directories

Resolves symlinks before computing relative paths, fixes #855

* Update changelog
2020-06-21 19:34:04 +08:00
Alexey Shmalko
f16de357a6
(feat): add 'first-directory option for org-roam-tag-sources (#851)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-06-19 18:22:52 +08:00
Jethro Kuan
6a37fff1e6
(fix): fix bad upcase for org-roam-tag-sources (#849) 2020-06-19 01:58:17 +08:00
Jethro Kuan
527c693f65
(docs): Update links to online page (#848)
We now own and use the orgroam.com domain
2020-06-18 19:30:42 +08:00
Jethro Kuan
76d419cc89
(fix): fix emacsql-sqlite3-executable possibly unbound (#846)
On old versions of emacsql-sqlite3, this will catastrophically fail.
2020-06-18 14:44:26 +08:00
Boris Buliga
fd73da9410
(feat): org-roam-insert: return selected file (#839)
This is useful in scenarios when you want to automatically do something with the
context where the link was inserted.
2020-06-17 19:07:35 +08:00
Zachary
1276e801c0
(feat): add customizable org-roam-title-to-slug-function (#833)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-06-17 14:58:11 +08:00
Leo Vivier
04d335cc40
(fix): Check sqlite3’s executability before existence (#838) 2020-06-17 14:52:26 +08:00
N V
8b16e5d520
(feat): org-roam-find-file-function customization (#807)
Allow users to specify a function for finding files in various commands.
Can be let-bound to define new commands that suit user preferences.

See: #790
2020-06-16 15:37:03 +08:00
Leo Vivier
7ab67436a7
(feat): Implement ‘org-roam-insert-immediate’ (#814) 2020-06-15 18:34:27 +08:00
Jethro Kuan
9cf26494e8
(ux): update the error message for org-roam-unlinked-references (#818)
Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
Co-authored-by: Santiago Gepigon <santiago.gepigon@gmail.com>
2020-06-13 22:33:37 +08:00
Jethro Kuan
0d5efe1c14
(fix): fix unlinked-references for older Emacs (#812)
Emacs' in-built rx.el was rewritten in Emacs 27, and the form `anychar`
only exists in later versions. We use the older form `anything` that has
support even in Emacs 26.

Emacs 26: https://github.com/emacs-mirror/emacs/blob/emacs-26/lisp/emacs-lisp/rx.el#L889
2020-06-13 11:14:57 +02:00
Jethro Kuan
eca07277ce
(release): Org-roam v1.2.0 (#802) 2020-06-12 23:29:52 +08:00
Jethro Kuan
48158e67d4
(feat): add org-roam-unlinked-references (#787)
`org-roam-unlinked-references` uses rg to search for unlinked references. Regex courtesy of @angelsl.

Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
2020-06-12 23:21:01 +08:00
Leo Vivier
7f7ba857de
(feat): add support for headlines (#783)
Achieve feature parity between links to files and links to headlines.

Before, we used the `file:foo::*bar` format to link to the headline `bar` in file `foo`, but this was prone to breakage upon renaming the file or modifying the headline. This is not the case anymore. Now, we use `org-id` to create IDs for those headlines, which are then stored in our database to compute the relationships and jump around. Note that this will work even if you’re not using `org-id` in your global configuration for Org-mode.

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-06-12 18:51:13 +08:00
Noboru Ota
43dbad1f62
(UX): Add more meaningful error message for sqlite3 (#776)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-06-12 17:14:59 +08:00
Leo Vivier
1168c9b6da
(fix): Fix syntax for calling compiled versions of functions (#791) 2020-06-11 08:39:12 +02:00
Jethro Kuan
92e02b5d14
(internal): remove redundant org-ref require (#788) 2020-06-10 20:02:37 +08:00
Jethro Kuan
30599cc3e8
(fix): fix prop extraction failures (#772)
This fixes a bug introduced in #770. Interestingly,
`org-element-property` always returns the prop in allcaps, so a
string-equal would have been sufficient. This commit reverts all usages
of `org-roam--extract-global-props` to use the upcase version of the
properties.
2020-06-07 22:10:47 +08:00
Jethro Kuan
9d5a34d0f4
(internal): lowercase all properties (#770) 2020-06-07 16:25:34 +08:00
N V
5bf3e596c8
(feat): prefer lowercase versions of org in-file settings (#769)
See #768
2020-06-07 13:55:07 +08:00
Jethro Kuan
81e7a5b231
(fix): fix org-roam--list-files elisp fallback (#764)
Always fallback to the elisp implementation, when the shell commands
return garbage (possibly from shell configurations).
2020-06-06 19:27:15 +08:00
Jethro Kuan
1756ec6441
(fix): fix bad behaviour on malformed properties (#763)
Org-roam now skips over bad properties and throws a warning for the
given file that contains a malformed property. This allows most of the
database rebuild to complete, and for the user to fix the offending
file.

Fixes #728.
2020-06-06 16:48:42 +08:00
Jethro Kuan
c61f7e20f2
(fix): simplify org-roam--str-to-list (#762)
This simplifies `org-roam--str-to-list`, and ensures that it parses
numbers correctly too. Fixes #745.
2020-06-05 20:27:02 +08:00
Jethro Kuan
0cd4bc05c5
(feat): make roam properties case-insensitive (#757) 2020-06-04 16:39:23 +08:00
Lyn Headley
3ad43b0823
(internal): make org-roam--org-link-file-bracket-re more intelligible (#749) 2020-06-03 12:38:56 +08:00
Jethro Kuan
3440e647c0
(fix): add org-roam--directory-files-recursively (#737)
Emacs 26 does not have the follow-symlinks option in
`directory-files-recursively`, so we have to add it ourselves.
2020-05-30 22:32:30 +08:00
Jethro Kuan
1d28b07a7c
(fix): org-roam--list-files: canonicalize filenames (#735) 2020-05-30 20:32:32 +08:00
ulfl
47feff5a8b
(feat): allow for symlinks in the org roam directory (#733) 2020-05-30 18:52:25 +08:00