Commit graph

304 commits

Author SHA1 Message Date
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
N V
7200364d31
(internal): remove org-roam--touch-file (#718)
Unused function.
2020-05-28 02:37:01 -04:00
N V
91c905d7e3
(docs): org-roam.el clarify documentation (#716)
Fix typo, reword docstring, remove decorative ellipses
2020-05-28 14:12:01 +08:00
N V
5ee38f2d89
(fix): autoloaded commands load org-roam-mode (#712)
Users should not have to explicitly enable the minor mode before using
autoloaded commands.
2020-05-28 00:25:19 -04:00
Jethro Kuan
50cc81c76d
(internal): use emacsql-sqlite3 everywhere (#701) 2020-05-27 13:20:06 +08:00
Jethro Kuan
8818f50f41
(fix): fix symlinked directories and files not picked up (#700)
The implementations for org-roam--list-files-{find,rg} did not follow
symlinks, which cause them to not pick up symlinked files and
directories.
2020-05-26 13:46:08 +08:00
Jethro Kuan
ea6bd215fc
(fix): set default org-roam-list-files-commands for windows to nil (#698) 2020-05-25 13:26:46 +08:00
N V
a05b1ebcc3
(internal): refactor org-roam-find-file logic (#691)
Fail faster in case of nested capture.
Simplify logic for completions.
2020-05-23 17:42:47 -04:00
N V
214f9df844
(fix): org-roam--list-files strip ANSI color codes (#689)
Prevent shell commands from passing ANSI color codes through to callers.

see: #688
2020-05-22 23:51:52 -04:00
N V
4f5a82e291
(internal): org-roam.el formatting (#687)
Organize org-roam.el:
- Move functions so they are defined before they are referenced
- Move defcustoms to appropriate section, sort alphabetically
- Move interactive commands to appropriate section, autoload, sort.

Should not change any behavior, but make review easier.
2020-05-22 21:34:50 -04:00
Mykhailo Shevchuk
4d0b5734c8
(fix): fix org-roam--list-files escape (#684) 2020-05-22 21:14:03 +08:00
Lau Siaw Young
4cd0fe4e41
(internal): add rg and find support for org-roam--list-files (#664)
Speeds up org-roam--list-files using external tools. Simple benchmarks:

(benchmark 1000 '(org-roam--list-files-rg "./jethrokuan/braindump"))
"Elapsed time: 9.012230s (0.399595s in 5 GCs)"

(benchmark 1000 '(org-roam--list-files-find "./jethrokuan/braindump"))
"Elapsed time: 5.543965s (0.318566s in 4 GCs)"

(benchmark 1000 '(org-roam--list-files-elisp "./jethrokuan/braindump"))
"Elapsed time: 55.781495s (3.220956s in 41 GCs)"

Co-authored-by: N V <44036031+progfolio@users.noreply.github.com>
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2020-05-22 14:25:29 +08:00
Jethro Kuan
4a9401dd40
(feat): org-roam-doctor: add ROAM_TAGS and ROAM_ALIAS checks (#680) 2020-05-21 21:08:52 +08:00
Jethro Kuan
cce2db8b5a
(release): v1.1.1 (#668) 2020-05-18 22:04:51 +08:00
Jethro Kuan
4b45f1dbf5
(fix): fix link updating on file-renames (#660)
Fixes #647: file: links are now updated to reflect the directory change.
Also fixes #554: rename-files to directories are also resolved correctly now.

Co-authored-by: Leo Vivier <leo.vivier+dev@gmail.com>
2020-05-17 18:51:52 +08:00
N V
e0aee184a7
(fix): prevent org-roam-version from loading org-roam-dev (#659)
Instead of visiting file, insert library into temp buffer.
Prevents loading .dir-local dev environment, accompanying unsafe-variable prompt.
Prevents interference with org-roam.el if already open.
2020-05-17 03:41:40 -04:00