Commit Graph

717 Commits

Author SHA1 Message Date
060a29c91d (fix): use correct type for org-roam-db-update-method (#1295)
Fixes #1294.
2020-11-18 18:17:00 +08:00
8efec080e0 (ci): fix ci test flow (#1301) 2020-11-18 18:07:05 +08:00
61e01430e0 (perf): improve database update on 'immediate (#1285) 2020-11-16 21:27:23 +08:00
d70198bba9 (fix): fix cache updates on org-id creation in non-existing files (#1288)
closes #1287
2020-11-16 10:38:58 +08:00
face683e00 (internal): remove org-roam--get-title-or-slug function (#1284)
Every file has a title when saved into the database, so this function is
redundant in most cases (e.g. in org-roam-buffer, where backlinks are
fetched from the database).
2020-11-15 19:44:36 +08:00
baf0dd9d00 (doc): document tag completions (#1282) 2020-11-15 14:36:49 +08:00
a9fd6c0fc7 (fix): fix idle-timer not created on org-roam-mode (#1281)
Fixes #1280
2020-11-15 14:21:03 +08:00
6502874576 (doc): document completion-at-point (#1279) 2020-11-15 04:43:57 +08:00
8401784cd2 (doc): document org-roam-tag-sources (#1274) 2020-11-14 21:12:08 +08:00
6dc316c450 (doc): fix menu-comment styling (#1273) 2020-11-14 14:17:08 +08:00
48ef3fee11 (doc): document org-roam-title-sources (#1271) 2020-11-13 22:55:52 +08:00
16c520068b (doc): Fix typo (#1272)
The `olp` option in the lab notes example was swapped.
2020-11-13 14:22:58 +01:00
b1608bf869 (feat): capture: create OLP if does not exist (#1270)
Remove the requirement that the OLP already exists in the captured file.
Also, make OLP available beyond dailies functionality.
2020-11-13 16:29:00 +08:00
cc01cf346e (release): v1.2.3 (#1269) v1.2.3 2020-11-13 14:22:18 +08:00
eaf99cba03 (doc): minor changes (#1268) 2020-11-13 13:17:28 +08:00
65a2cb6efd (fix): readme: fix link to manual 2020-11-13 02:52:48 +08:00
bc12d1cf04 (feat): add org-roam-db-update-method (#1264)
* (feat): add `org-roam-db-update-method`

Add `org-roam-db-update-method`, which can be one of two choices:

1. `immediate`: the cache is updated upon file changes
2. `idle-timer`: Marks the org-roam database as dirty. If Emacs idles
for some seconds, the Org-roam cache is updated. This is the default,
and current behaviour.

The idle method makes for a smoother editing experience, but some
inconsistencies can be faced.

* org-roam-update-db-idle-seconds -> org-roam-db-update-idle-seconds
2020-11-12 19:48:40 +08:00
a86d82b20e (fix): fix backlink-to-current-p killing buffers (#1263)
Change `org-roam--backlink-to-current-p` to only perform a DB query.
2020-11-12 16:11:35 +08:00
d4c875b53b (doc): doc stylistic changes (#1262)
- style tables properly
- reduce pre font-size
2020-11-12 15:40:27 +08:00
2159b6a846 (web): Remove mention to company-org-roam on index.html (#1261) 2020-11-12 08:27:22 +01:00
1db4c22950 (doc): remove top-level TOC (#1260) 2020-11-12 15:13:59 +08:00
9c0f030ffd (doc): add indexes (#1259)
Add keystroke, command, function and variable indexes
2020-11-12 14:56:48 +08:00
983d7a8798 (doc): Link org-journal to section on daily-notes (#1258) 2020-11-12 07:47:44 +01:00
910b37268e (doc): make manual single-page (#1257)
This should make things easier to browse/search for. Also simplify styling.
2020-11-12 14:32:59 +08:00
d39556a78b (fix): unlinked-references: support filenames with spaces (#1256) 2020-11-12 12:05:14 +08:00
167553b8ee (doc): various improvements (#1253)
- options: explicitly enable smart quotes on export
- zettelkasten introduction: add sections for fleeting notes and
  permanent notes for easier access and reference
- anatomy: add a missing period
- encryption: clarify org-roam-encrypt-files is a user option
- roam protocol: remove extraneous heading
- roam protocol: small grammar fix
- doctor: explain what the doctor does by default
- org-roam-bibtex: explain part of what orb actually does
2020-11-11 18:04:09 +08:00
76affe177a (doc): reflect that we now allow multiple refs (#1251) 2020-11-11 15:42:45 +08:00
e96685b1a9 (fix): respect original link type during replacement (#1252)
During automatic link replacement, respect the original link type
i.e. absolute links remain absolute. Fixes #1228.
2020-11-11 14:25:50 +08:00
aef71f1623 (docs): use ox-texinfo+ (#1250)
This generates texi documents with understanding of variables and
functions.
2020-11-11 13:00:49 +08:00
d913447939 (fix): Fix command signature (#1247) 2020-11-10 18:04:59 +01:00
47e83f7d3f (fix): Deprecate old ord commands (#1246) 2020-11-10 17:57:26 +01:00
023bcce867 (internal): remove unnecessary variables (#1244)
For captures, enforce that `:file-name` needs to be specified, and
`:head` when not provided defaults to the empty string (i.e. no head)
2020-11-10 23:58:16 +08:00
4f6eb285bf (feat): Overhaul org-roam-dailies (#978)
Implement ideas from `org-journal` to `org-roam-dailies`.

Update the doc.
2020-11-10 14:31:38 +01:00
8c81104816 (feat): unlinked-references: add error message if rg has no PCRE2 support (#1243) 2020-11-10 13:48:50 +08:00
7602b8c48d (feat): Allow ORP to capture the webpage's selection (#1239)
* (feat): Temporarily store link when capturing with ORP

* org-roam-protocol.el (org-roam-protocol-open-ref): Replicate default
`org-protocol' behaviour temporarily for storing links
* org-roam-capture.el (org-roam-capture--capture): Prevent stored link from
being reset

When capturing a web-page with org-roam-protocol, a link is now temporarily
stored in `org-store-link-plist' via `org-link-store-props'.  This is to allow
the forwarding of properties to `org-capture', one of them being `:initial'
which contains the content of the selected text in the browser.

* (feat): Add toggle for storing link when capturing with ORP

* org-roam-protocol.el (org-roam-protocol-store-links): Add new toggle
(org-roam-protocol-open-ref): Conditionally store link for later used

Building up on b2ee5f2c68, the user can now
decide whether to store links when capturing with org-roam-protocol (default
nil).

* Update changelog
2020-11-08 13:30:16 +01:00
c6797cbd75 (feat): Allow one file to have multiple roam_key statements (#1215) 2020-11-07 15:33:31 +08:00
440461a90b (feat): add org-roam-prefer-id-links to select linking method (#1238) 2020-11-07 15:06:12 +08:00
4d423a916e (doc): add note on unlinked references and encrypted files (#1236) 2020-11-05 16:34:11 +08:00
b184cdaef0 (feat): use :preselect for ivy-read completions (#1234)
This way, in case of the initial-input being an exact match, ivy will suggest this one first.
2020-11-04 17:37:50 +08:00
b2cc997976 (fix): fix relative link replacement (#1233) 2020-11-04 15:25:08 +08:00
bc5c41d212 (fix): widen before title extraction (#1232)
Prevent renaming file and changing links incorrectly due to using (org-narrow-to-subtree) and saving.
2020-11-04 13:34:40 +08:00
7c83a84db3 (fix): only update relative path of file links (#1226) 2020-11-04 00:07:31 +08:00
56c47fbff8 (internal): make sure there are no byte-comp warnings... (#1220)
...about undefined functions or unused lexical variables.

Undefined functions: for example, s.el and org-element should be
`require`'d when their functions are used.

Unused lexical variables: if Org isn't loaded yet, dynamic variables
defined in org.el would be treated as lexical and byte-comp would emit
this warning. This is especially important in the future as
native-comp / gccemacs will optimize away unused lexical variables,
and we cannot rely on Org having been implicitly loaded before our
modules are compiled.

Explicitly stating in our modules that the variables are dynamic
prevents that.
2020-10-30 14:23:53 +08:00
0d235686f4 (fix): fix id-face killing buffers (#1218)
org-roam-id-get-file no longer falls back onto the current buffer: It queries the org-roam database, and optionally org-id-locations, and declares that it does not exist if it isn't in either.
2020-10-27 00:25:39 +08:00
ac2044b84b (fix): save current position in mark ring before id-open (#1217) 2020-10-26 13:36:35 +08:00
cffa0bd201 (fix): support multidir with dirty db flag (#1216) 2020-10-26 11:22:40 +08:00
bd8b5587f5 (internal): rename link columns (#1213)
from -> source
to -> dest

"from" is a reserved keyword in sqlite, so we avoid it.
2020-10-25 22:33:43 +08:00
b937bc9655 (internal): simplify db update operations (#1212)
Instead of maintaining a file queue to process for updating the Org-roam
database, we instead simply call `org-roam-db-build-cache` to rebuild
the db. `org-roam-db-build-cache` feels Fast Enough(TM), and basically
runs instantly if no files are modified. This greatly simplifies the
code, basically allowing to maintaining a single code path for db
operations.

This PR should also address the slowness wrt to ID links. Org-roam now
builds the headline information first, so there is no need to read the
file to check if the headline is there. The downside to this is that
this only works for IDs in Org-roam files.
2020-10-25 16:35:05 +08:00
a7cf48ea89 (fix): org-roam-db-build-cache: fix order of processing (#1201)
* (fix): org-roam-db-build-cache: fix order of processing

Org-roam used to perform the removal of deleted files towards the end.
This can cause some issues with db rebuilds. Consider this scenario:

1. Create a file `foo.org` with `id:abc`
2. Run `org-roam-db-build-cache`
3. Delete `foo.org`
4. Create a file `bar.org` with `id:abc`
5. Run `org-roam-db-build-cache`

Here Org-roam will complain that the id `abc` is a duplicate, and error
out, because the data for `foo.org` has not yet been cleared from the
database. This PR reorders the db creation steps the following way:

1. Figure out which files no longer exist, and which files are modified
2. Clear the database for these files, leaving only files that are
unmodified in the database
3. Insert new data from modified files into the database
2020-10-19 22:12:34 +08:00
46327991ef (fix): let-bind org-roam-last-window (#1198) (#1200)
* org-roam-buffer.el (org-roam-buffer--find-file): Make
org-roam-buffer--find-file insensitive to mutation of global
variables
2020-10-19 21:14:55 +08:00