Commit Graph

45 Commits

Author SHA1 Message Date
Jethro Kuan
f8dd345bd1 emacsql-sqlite3 -> emacsql-sqlite
Revert from emacsql-sqlite3 to emacsql-sqlite for foreign key support.
This makes it slightly harder to get Org-roam up and running for
Windows, but not impossible, but foreign keys makes database operations
faster and keeps the code clean.

Also, fix schemata for foreign keys on various tables, and add indices
where joins are common (org-roam-db--table-indices).
2021-05-02 16:30:43 +08:00
Jethro Kuan
9da45b54f3 remove s 2021-04-24 04:18:16 +08:00
Jethro Kuan
c866275086 move things around 2021-04-23 18:00:41 +08:00
Jethro Kuan
3c6e1b5194 add interactive functions
Added org-roam-{alias,ref}-{add,remove}. Fixed org-roam-protocol. Added
some docs.
2021-04-21 02:09:50 +08:00
Jethro Kuan
f62c00ea73 fix org-roam-protocol ref capture 2021-04-17 18:45:32 +08:00
Jethro Kuan
516d8dfbf8 pass node around instead 2021-04-11 17:10:57 +08:00
Jethro Kuan
866368bfee convert info to plist 2021-04-11 16:32:59 +08:00
Jethro Kuan
3a2df140cb update conversion to accept template overrides
rename org-roam-capture--capture to org-roam-capture-
2021-04-11 15:05:22 +08:00
Jethro Kuan
09b0d74359 add ref 2021-04-10 00:32:55 +08:00
Jethro Kuan
1b1d2b2b76 [?] add ref...? 2021-04-09 22:35:01 +08:00
Jethro Kuan
7a6b885b99 [breaking] update org-roam capture-template syntax 2021-04-09 15:54:26 +08:00
Jethro Kuan
39bb939dc2 remove org-roam-capture--context 2021-04-09 14:16:01 +08:00
Jethro Kuan
53dcf687ef org-roam v2 2021-03-19 11:20:18 +08:00
Sean Farley
8ad57b1218 (fix): support %i in org-roam-protocol (#1445) 2021-03-08 12:57:38 +08:00
Jethro Kuan
3fb4e21adf (fix): fix org-roam-protocol--open-ref creating new files (#1375)
We need to split the ref into its type/file before querying the db for a
match. Throw a warning when `org-roam--capture-new-file` tries to
recreate an existing file.
2021-01-10 23:05:45 +08:00
Jethro Kuan
43831c5819 (fix): allow link captures (#1347)
Previously we had set `org-capture-link-is-already-stored` to `t` in
org-roam captures, because org-roam-protocol stores links. This
prevented regular captures from utilizing the %a element in the
templates.

Instead, only set `org-capture-link-is-already-stored` in the
org-roam-protocol capture command.

Fixes #1341.
2020-12-16 21:12:21 +08:00
Jethro Kuan
cc01cf346e (release): v1.2.3 (#1269) 2020-11-13 14:22:18 +08:00
Leo Vivier
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
Jethro Kuan
0cce9d1165 (release): Org-roam v1.2.2 (#1168) 2020-10-06 03:02:41 +08:00
Jethro Kuan
7a76f7b476 (internal): remove compat functions (#1167)
* remove org-roam-link-make-string
* remove org-roam-link-store-props and org-roam-link-decode
2020-10-06 02:45:59 +08: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
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
89e9121f26 (release): Org-roam v1.2.1 (#975) 2020-07-27 01:03: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
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
Jethro Kuan
eca07277ce (release): Org-roam v1.2.0 (#802) 2020-06-12 23:29:52 +08:00
Jethro Kuan
cce2db8b5a (release): v1.1.1 (#668) 2020-05-18 22:04:51 +08:00
N V
1722fae9af (internal): org-roam-dev use directory-local variable (#607)
Add .dir-locals.el to load org-roam-dev for all source files.
2020-05-12 13:46:12 -04:00
N V
3727f015cd (internal): add org-roam-dev.el (#606)
Help ensure source code consistency.
emacsql indentation for now, but can easily be expanded as needed.
2020-05-13 01:21:54 +08:00
Jethro Kuan
3efe315ff1 (internal): add org-roam-message (#593)
This macro simplifies message printing, so we can respect
`org-roam-verbose` in more places. Also silences more messages when
`org-roam-verbose` set to false.
2020-05-10 16:44:28 +08:00
Leo Vivier
c70f2d5f54 (fix): update repo root to group (#591) 2020-05-10 13:48:16 +08:00
Leo Vivier
46fd2a9a68 (fix): allow group templates in capture-templates (#584)
Co-authored-by: N V <44036031+progfolio@users.noreply.github.com>
2020-05-09 18:08:08 +08:00
Jethro Kuan
7df50c14ec (internal): make lint errors fail CI, and disable spellcheck during linting (#561)
- make lint errors fail CI
- disable indentation linting
- disable package linting for org-roam-macs.el
- disable spellcheck for checkdoc
- fixes compilation errors
2020-05-04 15:17:39 +08:00
Jethro Kuan
27a63b59b1 (release): 1.1.0: update version headers in source (#502) 2020-04-21 20:50:24 +08:00
Jethro Kuan
b607e56c5f (feat): Add interactive org-roam-capture (#371) 2020-03-29 17:29:57 +08:00
N V
22b9d4bd22 (internal): modularize features (#363)
Addresses #357
2020-03-28 21:16:28 +08:00
Jethro Kuan
63e0558d96 (chore): Cleanups for MELPA release (#251)
* (chore): require minimum Org version 9.3

* fix bytecompile errors for org-roam.el

* fix checkdoc errors

* fix more things
2020-03-08 15:58:13 +08:00
Jethro Kuan
e357693297 (release): v1.1.0-rc1 (#238) 2020-03-06 20:39:28 +08:00
Jethro Kuan
b7afb02015 (chore): Cleanup for MELPA release (#236) 2020-03-06 20:15:33 +08:00
Jethro Kuan
d1a47e090e (docs): update docs (#229) 2020-03-06 00:19:11 +08:00
Jethro Kuan
b7a7741bb0 (feature): use org-capture templates (#216)
Instead of implementing our own templating system, we abuse org-capture's templating system. We add 2 additional properties:

- :head: a starting template that goes at the beginning of the file.
- :file-name: a string that expands to the file name

The templates are customizable at `org-roam-capture-templates` and `org-roam-ref-capture-templates`.
2020-03-05 00:21:24 +08:00
Jethro Kuan
f98e7d22a5 (chore): cleanup and re-order code (#213) 2020-03-01 15:36:39 +08:00
Jethro Kuan
150ae65564 (feature): deprecate roam-protocol, extend org-protocol instead (#203)
Add 2 custom handlers:

1. roam-file?file=path: this simply opens the file at path in Emacs.
2. roam-ref?ref=ref&template=roam-template&title=title&...: attempts to open a roam note with a given ROAM_KEY. If the note doesn't exist, create one. Else, open it.
2020-02-29 22:09:04 +08:00
Jethro Kuan
0c2aaad3df (feature): use sqlite as backing database (#200)
All org-roam related information will now be stored in the database. Henceforth, the cache needs to be built synchronously once (via `M-x org-roam-build-cache`), which is then incrementally updated.
2020-02-29 15:56:08 +08:00
Jethro Kuan
5e76c67cf6 (feature): emacs-lisp handling for roam:// links (#188)
We emulate org-protocol, and advise server-find-files, stripping the
roam protocol from the filename. This reduces the setup required to
open `roam://` links.
2020-02-26 15:35:20 +08:00