Commit graph

83 commits

Author SHA1 Message Date
Kisaragi Hiu
82ac6b6b9c
(internal): speed up extraction of global props, headlines, and title (#1061)
Some checks failed
Docs / build (push) Has been cancelled
CI / build (snapshot) (push) Has been cancelled
Avoids usage of org-element-parse-buffer, preferring simple regex searches.
2020-08-24 22:14:15 +08:00
Kisaragi Hiu
c33867e6bc
(feat): allow ignoring files matching a regular expression (#1046)
Adds a new user option, `org-roam-file-exclude-regexp`, to exclude files from Org-roam.
2020-08-18 16:16:56 +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
Jethro Kuan
da6fdd7542
(feat): support fuzzy links (#910) 2020-08-05 20:52:27 +08: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
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
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
Jethro Kuan
c24fb51b03
(feat): cache entered template variables (#952)
Fixes #951.
2020-07-20 22:14:21 +08: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
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
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
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
Jethro Kuan
11e0aa4c55
(feat): warn on duplicate IDs and refs rather than fail (#854)
Instead of having db update operations fail, a useful error is shown, and the db updates complete. Closes #816.
2020-06-21 17:00:20 +08:00
Jethro Kuan
408e38f8ba
(perf): use sqlite transactions, and GC less (#847)
We use sqlite transactions to commit changes into the database, rather
than storing all the data in a list before running one big insert.
Hopefully this gives a noticeable perf boost.

We also add `org-roam-db-gc-threshold`, which shaves time by deferring the garbage collection to the end.
2020-06-19 18:27:14 +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
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
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
7ab67436a7
(feat): Implement ‘org-roam-insert-immediate’ (#814) 2020-06-15 18:34:27 +08: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
Tim Quelch
39276362d7
(docs): add entries to changelog (#795) 2020-06-12 11:31:06 +08:00
Jethro Kuan
9d5a34d0f4
(internal): lowercase all properties (#770) 2020-06-07 16:25:34 +08:00
Jethro Kuan
0cd4bc05c5
(feat): make roam properties case-insensitive (#757) 2020-06-04 16:39:23 +08:00
Jethro Kuan
721689d5b5
(feat): add org-roam-buffer-window-parameters (#750)
The variable `org-roam-buffer-window-parameters` gives more
flexibility in customizing the org-roam-buffer window parameters.
`org-roam-buffer-no-delete-other-windows` is deprecated in favour of
this.
2020-06-03 23:25:31 +08:00
Jethro Kuan
50cc81c76d
(internal): use emacsql-sqlite3 everywhere (#701) 2020-05-27 13:20:06 +08:00
Jethro Kuan
cce2db8b5a
(release): v1.1.1 (#668) 2020-05-18 22:04:51 +08:00
Jethro Kuan
d68d1f8ebb
(feat): add org-roam-doctor (#570)
`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.
2020-05-10 13:57:18 +08:00
Leo Vivier
c70f2d5f54
(fix): update repo root to group (#591) 2020-05-10 13:48:16 +08:00
Göktuğ Karakaşlı
11d239d661
(feat): fix citation links not showing up in graph (#547)
This change adds a `type` column to the refs column, and strips the prefix before storing the key in the `refs` table.
2020-05-04 20:44:15 +08:00
Jethro Kuan
a723199d68
(feat): apply error face if file link is broken (#560) 2020-05-04 12:57:43 +08:00
Jethro Kuan
69d4f05a13
(feat): add prefix argument to force database rebuild (#553)
* (feat): add prefix argument to force database rebuild

* Update changelog
2020-05-03 18:40:32 +08:00
Tim Quelch
1ad3539c54
(fix): ensure that multicite links are correctly split (#545)
* 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>
2020-05-01 11:57:28 +02:00
Jethro Kuan
7680663205
(feat): optionally use headline as title (#538)
Optionally pulls title from the first headline in Org file. Closes #506.
2020-04-29 12:42:55 +08:00
Jethro Kuan
bd4b9d41e8
(bugfix): quote graphviz configuration options (#537)
Always quote graphviz configuration options. This allows passing
configurations with spaces. Fixes #535.
2020-04-29 11:30:39 +08:00
Jethro Kuan
487025aa2f
(chore): remove org-roam-completion-fuzzy-match (#523)
Remove the fuzzy matching variable introduced in #289. The rationale is
addressed in
https://github.com/jethrokuan/org-roam/issues/514#issuecomment-619438401:
Helm, Ido and Ivy have their own mechanisms for fuzzy search, and can be
tweaked using their own configuration options outside of org-roam, e.g.
through `ivy-re-builders-alist`.
2020-04-26 18:32:27 +08:00
Jethro Kuan
d01f7b2daf
(bugfix): fix inserting backup files into database (#509)
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.
2020-04-22 14:35:47 +08:00
Jethro Kuan
339336a27f
(release): 1.1.0 (#501) 2020-04-21 20:43:21 +08:00
Jethro Kuan
ea1ba21825
(chore): inline links in changelog (#467)
I had initially thought that keeping them separate would be cleaner, but
it's very easy to forget to add the links at the bottom of the
changelog. Relevant emacs-lisp that did this:

(replace-regexp "\\[gh-\\([0-9]+\\)\\]" "(https://github.com/jethrokuan/org-roam/pull/\\1)")
2020-04-15 15:28:47 +08:00
Jethro Kuan
d7fc91e047
(feat): Add support for different file extensions (#465)
Adds `org-roam-file-extensions`, which allows org-roam to detect file extensions other than .org. Fixes #461
2020-04-15 15:02:05 +08:00
Tim Quelch
580a320c66
(feat): graph: add cite links to graph (#439) 2020-04-12 14:38:58 +08:00
Alexey Shmalko
1b13c426aa
(feat): add org-roam-graph-edge-extra-config (#435)
Introduces `org-roam-graph-edge-extra-config` to add options to edges
2020-04-11 13:41:21 +08:00
Jethro Kuan
e73bc78274
(feat): Add org-ref citation support (#374)
Adds support for org-ref cite: links to the backlinks buffer.

Requires a db-rebuild, since the db schema has changed.
2020-04-06 16:48:17 +08:00
Jethro Kuan
e4f77eb586
(feat): Add org-roam-graph-node-extra-config (#385)
org-roam-graph-node-extra-config is an alist containing additional node
configuration options, as per
https://graphviz.gitlab.io/_pages/doc/info/attrs.html

This also deprecates org-roam-graph-node-shape, which is a special case
of the node options
2020-04-01 11:36:24 +08:00
philip-bl
2e3119e027
Allow top and bottom placement of the sidebar in addition to left and right (#380)
* 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.
2020-03-31 18:34:23 +08:00
Jethro Kuan
df29da1b6d
(feat): add variable for muting messages (#359)
Adds `org-roam-verbose`, which echoes messages that are not errors.
2020-03-27 15:09:52 +08:00