Commit Graph

483 Commits

Author SHA1 Message Date
7ce95a286b release 2.3.1 2025-06-26 11:55:56 -07:00
2ff616fbd8 release 2.3.0 2025-05-24 23:06:32 -07:00
0037daaf3e docs: update caching docs
Now that emacsql handles choosing an appropriate backend/connector, we
do not need to provide these instructions.  If there are issues, emacsql
has good error messages that tell the user what they need to do to get
things working.

In general:
  - If the user is on Emacs >= 29, emacsql will use the built-in sqlite
    functionality that comes with Emacs.
  - If the user is on Emacs < 29, emacsql will use a module-based
    connector that requires the user to have certain libraries available
    on their machine.  emacsql will tell the user what is needed if they
    do not have it already.

Ref: #2486
Close: #2502
Close: #2415
2025-02-18 09:22:30 -08:00
ed272eaf56 Address compiler warnings
Depend on Org 9.6 for `org-fold-show-context'.
2025-02-18 08:56:35 -08:00
551ff3b17e Use org-fold-show-context instead of obsolete function alias
To avoid having to create a wrapper function and silence the byte-
compiler for both when using a pre-rename and post-rename Org, keep
it simple and just depend on Org 9.6.
2025-02-18 08:56:35 -08:00
719594dfc7 org-roam-db: Don't unnecessarily enable foreign keys support
Starting with EmacSQL v4.1.0, `emacsql-sqlite-open' takes care of that.
2025-02-18 08:56:35 -08:00
2490afe110 refactor: remove emacsql-sqlite backend option
This option is no longer supported in emacsql 4.0 and was throwing
linter errors in CI.

Ref: 7a79c2be3d
2025-02-17 12:48:43 -08:00
40b6c10d8a nit: formatting update
My editor reformatted some of the identation.  Also corrected a
docstring for org-roam-refile.
2025-02-17 12:48:43 -08:00
64e302c126 Depend on emacsql 4.0.0 (#2466)
See https://github.com/magit/emacsql/issues/113.  Emacsql 4.0.0 has
been released and should now be used in the package-requires header.
2025-01-10 21:52:11 -05:00
fdd834d9bf (docs): explain org-roam-file-exclude-regexp (#2458) 2024-07-14 10:15:41 +02:00
b5436f3410 depend on snapshot of emacsql (#2327) 2023-03-05 09:20:26 -08:00
7d2f511251 (minor): fix lints on main (#2320) 2023-02-23 14:42:35 +08:00
74422df546 add discoverability support for age encrypted org files (#2302) 2022-12-31 13:22:30 -08:00
c386761914 (fix): autoload org-roam-list-files (#2226) 2022-06-20 22:27:01 -07:00
01843a6486 (chore): reapply #2178 (#2197) 2022-05-16 09:40:37 -07:00
c0871c42be (fix) org-roam-file-p handle opening a buffer with no path (#2185)
reapply #2169
2022-05-07 17:19:48 -07:00
007e76725c (chore) fix version numbers (#2182) 2022-05-03 18:06:55 -07:00
5483e65d5a (fix)org-roam-file-p: don't exclude org-roam-directory (#2178)
* (fix)org-roam-file-p: don't exclude org-roam-directory

Don't exlude the org-roam-directory even if it matches
org-roam-file-exclude-regexp.

Should fix [#2165].

* Refactor PR #2178

Refactor PR #2178 to avoid recalculating (file-relative-name path
org-roam-directory) multiple timess.
2022-05-02 09:12:28 -07:00
69116a4da4 v2.2.2 (#2171) 2022-04-24 17:05:27 -07:00
3014c63d50 (feat)log: init (#2170)
Create initial log module for working with Org logs
2022-04-24 16:57:13 -07:00
a073bcff5c (fix) org-roam-file-p handle opening a buffer with no path (#2169)
* (fix) org-roam-file-p handle opening a buffer with no path

Found this issue when opening a .epub file with nov.el (a package
that renders EPUB file) because nov.el doesn't store the filename
in buffer-file-name, opening it caused errors with org-roam-file-p.

* (minor): org-roam-file-p check if filename is non-nil first
2022-04-23 16:36:09 -07:00
61a544cebd (core): ignore org-attach-id-dir by default (#2160) 2022-04-16 14:49:03 -07:00
3782e88d50 (release): v2.2.1 (#2126) 2022-03-14 23:37:29 -07:00
b4f14eebae (feat)capture: add org-roam-post-node-insert-hook (#2125)
* (feat): add org-roam-post-node-insert-hook

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2022-03-14 23:24:55 -07:00
c51cadfe25 (fix)core: fix broken shell-based file listing methods (#2118)
Change #2025 broke the `org-roam--shell-command-files` filter that
affects all of the `org-roam-list-files-command` methods except
`elisp`.  This causes `org-roam--list-files` to iterate through the
variants executing their commands via `org-roam--shell-command-files`
but to not see any output, until it finally lands upon `elisp` and
gets some results.

The issue is that "#'s-present?" was replaced by

  (or (null s) (string= "" s))

effectively negating the test and converting it to "#'s-blank?".

This addresses that by negating the current test.
2022-03-10 16:07:39 -08:00
f50d6e7376 (fix): caching symlinked files (#2112)
* Revert "(fix): `org-roam-descendant-of-p` bug on Windows (#2089)"

This reverts commit 97a342fd3f.

Reason:

It seems that the `file-in-directory-p` function proposed in #2089 is provided only for
*physical directories*, does not work as we would like with *symlinked directories*.
It dereferences all the symlinks in its path, and previously seemed related paths
cease to be such.

Because of this, such notes are ignored and not indexed, although they
were indexed earlier.
2022-03-03 22:47:24 -08:00
97a342fd3f (fix): org-roam-descendant-of-p bug on Windows (#2089)
On Windows, `file-truename` and `directory-file-name` downcase driver
label: "C:/" => "c:/", while `expand-file-name` keep the case
unchanged. If `org-roam-directory` use upper case driver label, `org-roam-descendant-of-p` will alway return `nil`. Fix by only using `file-truename` in the function.
2022-02-20 10:05:12 -08:00
eed1df90f5 (feat)id: add org-roam-id module (#2072) 2022-01-30 22:54:28 -08:00
c0c240b975 (chore): Drop f.el and s.el dependency (#2025)
Drops the f.el and implicit s.el dependency.

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2022-01-15 21:26:20 -08:00
6170cc9928 (release): bump 2021 -> 2022, 2.1.0 -> 2.2.0 2022-01-14 10:53:56 -08:00
86c9085363 (fix)core: make 'fd and 'fdfind backend work for listing files (#2021) 2022-01-11 15:05:27 -08:00
b96efbb444 (minor)chore: fix minor warnings by native compiler (#1959)
* Fix warnings reported by emacs (--with-native-compiler)
* Drive-by fix for org-roam-database-connector's :group
2021-11-11 20:00:07 +08:00
5651f4598c (chore)libraries: s/s-join/string-join/g (#1906)
Remove usages of s-join. s.el is currently pulled in implicitly by f.el.
2021-10-16 16:25:03 +08:00
941bd1f6b4 (fix)compat: resolve all the missing compile-time dependencies (#1820)
48a5d01726 was wrong, and the closure wasn't the cause. The source of
the issue stems from a missing compile-time dependency on subr-x.

Emacs 28 doesn't seem to require it for the needed functions anymore,
while older Emacsen still do. What even worse, the byte compiler doesn't
seem to complain about such thing on older Emacsen and the error message
produced at the run-time isn't helpful to identify the cause.

Fixes #1814.
2021-08-29 05:41:36 +03:00
714ea7a3fc (chore): upgrade dependency of magit-section to 3.0.0 (#1808)
Closes #1803.
2021-08-26 19:15:16 +08:00
d25d477b4f (refactor): ensure dependencies are loaded for org-roam-utils.el (#1799)
If org-roam-utils.el is byte-compiled when org-macs is not loaded (`org-with-point-at` macro missing), error can appear about missing `org-with-point-at`.
2021-08-23 01:41:58 +03:00
f819720c51 v2.1.0 (#1792) 2021-08-21 02:57:40 +08:00
5dce6261a2 (feat): replace org-roam-{setup,teardown} with org-roam-db-autosync-mode (#1758)
Comply with the principle of least astonishment, where in Emacs having a
global minor mode for this purpose would be the most expected thing to
have.
2021-08-10 14:02:17 +08:00
2d8dc8e31b (feat): globally restructure and refactor the codebase (#1724)
Detangle the codebase and change how dependencies are resolved to
allow the package to better modularize and load itself without
introducing circular dependencies, especially when autoloads involved.
2021-08-08 13:53:35 +08:00
48d1c152f5 (feat)db: add org-roam-db-update-on-save (#1720)
Adds new variable org-roam-db-update-on-save, which when set to nil,
will disable db updates on file save. Closes #1717.
2021-08-01 14:00:16 +08:00
829ee68860 (feat): add org-roam-extract-subtree (#1710)
Adds org-roam-extract-subtree, which converts the subtree at point
into a top-level file node. This is useful for when a node you are
expanding on gets too big, and deserves its own file.

Closes #1104, #1658
2021-07-30 14:49:32 +08:00
127d6efa48 (feat)org-roam-format: add default-value (#1709)
Allow specification of default values in org-roam-format of the form ${key=default_val}.
2021-07-29 23:27:55 +08:00
a84da59b41 (fix)tags: splitting and joining of multiple filetags (#1705)
Current, when fetching file level org tags (from the #+filetags property), multiple tags are split based on the default `split-string` separator. This is incorrect because the org documentation says that multiple file-level tags should be separated by `:` (like headline level tags). This results in a improper splitting (aka no split) of the tag string into multiple tags. This leads to the inability to delete tags that are there.

Similarly, when writing multiple filetags, the tags are joined by " " instead instead of ":" as mentioned in the org docs. This leads to improperly added tags where newly added tags would not be recognized by org.

This PR fixes both problems, parsing is done by string splitting on ":" (with the `OMIT-NULLS` parameter set to true so you don't get a null values from the fact tags start and end with `:`). Joining multiple tags is now done with the `org-make-tag-string` function instead of manually joining on space. These changes result in the ability to add and remove file level tags such that the resulting value of the `#+filetags` property is a valid tag string.
2021-07-29 18:52:07 +08:00
3f2d42142c (fix)org-roam-id-at-point: ignore top-level excluded nodes (#1704)
Previously if a top-level file node is excluded, it would still be
picked up by org-roam-id-at-point. This adds another org-roam-db-node-p
check before returning an ID, fixing the broken behaviour. Fixes #1635.
2021-07-29 11:15:14 +08:00
1db4c34c8a (fix): remove invisible tag (#1641) 2021-07-28 21:41:45 +08:00
e31ac73a4d (feat): add filter-fn and templates to interactive commands (#1693)
The rationale for this change is to allow context-specific capture
consideration.  That is to say, in my experience, when I'm working on a
project, I often want to scope my note finding and creation to that
project.  By adding `filter-fn` and `templates` I can easily craft
context-aware functions for my note-taking.

I chose to switch these to `cl-defun` to expose `&key` parameters, which I
find more useful as the method signature grows.

Closes #1681

From the Github Issue:

> Adding a `filter-fn` parameter to `org-roam-capture` and a `templates`
> parameter to `org-roam-capture` , `org-roam-node-insert`,
> `org-roam-node-find` would improve their general utility, and reduce
> fiddling with the more inner functionality of `org-roam-capture-` and
> `org-roam-node-read`
2021-07-28 02:16:00 +08:00
6dc8dda5e5 (fix)preview: fix link preview when headline contains link (#1676) 2021-07-26 13:48:50 +08:00
d1e3a5d9be (feat): formalize node dedicated buffers (#1622)
This adds the whole new section in `org-roam-mode.el` for node dedicated
buffers, with a new global command `org-roam-buffer-display-dedicated`,
which supersedes `org-roam-buffer` command.

Along the way this also refactors the code for the persistent buffers to
clean it up, make it more clear in what it does, improve its robustness,
and to make it play nice with the dedicated buffers.
2021-07-23 19:19:30 +08:00
9c10a3c04c (feat)preview: improve org-roam link preview (#1655)
1. If it the link is at a headline, it shows the headline's content
instead of just repeating the headline
2. If the link is a bullet item in the plain-list, show the full list instead
2021-07-22 01:46:12 +08:00
d9015cb931 (fix): fix org-roam-file-p crashing (#1651)
org-roam-file-p throws `wrong-type-argument stringp nil` on buffers that
do not have a corresponding file. This fix changes org-roam-file-p to
return nil instead of crashing in this scenario.

Addresses #1645
2021-07-21 20:57:59 +08:00