Commit Graph

1092 Commits

Author SHA1 Message Date
8667e44187 (docs): update org-protocol instructions (#2401) 2024-01-14 11:42:08 -08:00
2e94f55cc5 (node) add optional NOCASE parameter to org-roam-node-from-title-or-alias (#2403)
* (node) add NOCASE parameter to org-roam-node-from-title-or-alias

* fixed docstring of org-roam-node-from-title-or-alias.
2024-01-14 11:41:46 -08:00
5c06471c3a (node): org-roam-node-at-point: don't error in non-org buffers (#2329)
`=' assumes that both objects being compared are numbers. In some
buffers `outline-level' can return nil, so `=' returns an error. `eq'
does not assume this, but does return t when comparing two numbers.
2023-03-07 09:21:01 -08:00
b5436f3410 depend on snapshot of emacsql (#2327) 2023-03-05 09:20:26 -08:00
f7dc81e494 Fix org-fold-core-style in org-roam-buffer (#2325) 2023-03-05 09:20:07 -08:00
e73807efe1 Add customisable function for prompting when adding refs (#2317)
* (node): new custom `org-roam-ref-prompt-function'

Function for prompting when adding a ref.

* (node): use `org-roam-ref-prompt' in `org-roam-ref-add'

Prompt properly for ref.
2023-02-23 14:45:37 +08:00
1981dc3617 utils: descendant-of-p: Defend against nils (#2319)
This has an effect on find-file-hook for totally unrelated files,
through the callchain of `org-roam-db-autosync--setup-file-h ->
org-roam-file-p -> org-roam-descendant-of-p'.

From an org file, inside a project-el project, (find-file
"some/other/file") will intermittently reproduce this error:

   org-roam-descendant-of-p: Wrong type argument: arrayp, nil

If this fix seems inappropriate -- it could amount to surppressing a
valid error in routine calls -- then I would advise throwing an
explicit signal here, or finding a safer way to get the `path` inside
`org-roam-file-p'; the current means:

    (or file (buffer-file-name (buffer-base-buffer)))

.. can result in nil, which then bleeds errors into use elsewhere.

for posterity, here is the full calling context I'm referring to, from
`org-roam-file-p'.

  (let* ((path (or file (buffer-file-name (buffer-base-buffer))))
         (ext (when path (org-roam--file-name-extension path)))
         (ext (if (string= ext "gpg")
                  (org-roam--file-name-extension (file-name-sans-extension path))
                ext))
         (org-roam-dir-p (org-roam-descendant-of-p path
         org-roam-directory))
         ...
2023-02-23 14:43:47 +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
938c602faa (core): add org-roam-node-category (#2300) 2022-12-26 18:19:51 -08:00
45a6863e07 (completions): don't complete org-roam nodes in source blocks (#2292)
* don't complete org-roam nodes in source blocks

This fixes the following situation where
`org-roam-completion-everywhere = t` and you are working with org-babel
blocks in one of your org-roam nodes.

```
```

Before my nodes would be suggested, but after this change only valid
babel headers are suggested as desired.

Previously completions from org-roam nodes would be suggested

* fix lints

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2022-12-25 10:39:30 -08:00
cdad2ee7f6 (db): default to sqlite-builtin when available (#2299) 2022-12-25 10:25:55 -08:00
256fe73e7a (docs): update documentation on database-connectors (#2298)
Update docs to reflect sqlite-bulitin and sqlite-module
2022-12-24 10:50:01 -08:00
f9228ce319 (feat): add support for filtering backlinks. (#2247)
* Add support for filtering backlinks.

See #1043.

* Add documentation for backlinks filter
2022-12-04 19:55:47 -08:00
Eli
25c476791e (fix): update org-roam-unlinked-references-section check (#2254)
`org-roam-unlinked-references-section` would get nil org-roam-node-title
when create a headline node, which caused the issue #1625. This commit
add a check to make `org-roam-unlinked-references-section` work
correctly.
2022-12-03 09:50:01 -08:00
78ee5c6814 (fix):fill outline of link in properties (#2230) 2022-12-03 09:49:23 -08:00
apc
3add6748ae Minor typo in the commented text of the definition of org-roam-refile (#2263) 2022-12-02 00:17:10 -08:00
e418037991 (docs):orgmode.org/elpa has been shut down (#2258)
See https://list.orgmode.org/87blb3epey.fsf@gnu.org/ for details.
Removed it from the documentation in the manual to (try and) assist newcomers.
2022-12-02 00:16:42 -08:00
05f67901c6 (feat):support multi-line org titles (#2264)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2022-12-02 00:16:11 -08:00
c2e852e102 (feat)org-roam-tag-add: use tags separator as crm-separator (#2282)
Allows use of : in minibuffer to separate multiple selected tags.
2022-12-01 23:57:41 -08:00
4e6f934690 (fix)refs:support spaces in links (#2285)
Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
2022-12-01 23:55:04 -08:00
d95d25615e (Docs): Fixed typos in the docs (#2256)
* Fix typo

* Fix typo

* Fix typo
2022-09-08 09:25:56 -07:00
7f453f3fff (fix)promote: promote all metadata to file level (#2246)
Without specifying `t`, it is only pushing the PROPERTIES drawer up  to
the file level, missing any other "planning information, clocking lines and
any kind of drawer." We want to promote all of this to the file level.
2022-08-03 21:37:36 -07:00
e435581215 (fix): remove use of deprecated org-font-lock-ensure (#2238) 2022-07-23 13:58:47 -07:00
nth
917a325dd9 (fix): links not displayed properly in org-roam-buffer (#2236)
Closes #2228.
2022-07-23 08:47:08 -07:00
c386761914 (fix): autoload org-roam-list-files (#2226) 2022-06-20 22:27:01 -07:00
171a8db32f (db)fix: file modification detection failing in some edge cases (#2221)
One example of an edge case:

- If a file has LF line endings,
- and is situated in a repository where .editorconfig asks for
  CRLF,
  (Such repositories exist, for example
  <https://github.com/obsidianmd/obsidian-docs/>.)
- and editorconfig-mode is enabled,

org-roam-db--file-hash would then return different results depending
on whether the file path is passed to it or not.

While this is a contrived edge case, there may be other cases like
this where the data from insert-file-contents-literally and the data
from find-file-noselect makes secure-hash return different values.

This commit removes the branch in org-roam-db--file-hash to compute
the hash based on buffer content, instead making it always require a
file path.

(This commit also allows org-roam-db-insert-file to take an optional
HASH argument, allowing it to avoid recalculating the hash.)

Since now we always compute the hash with the file on disk, the
special case for encrypted files is no longer needed.

This should have no impact on whether db is synchronized. The only
case when db--file-hash uses the "calculate in current buffer" path is
in db-insert-file; the only use of db-insert-file is in
db-update-file, which already calls db--file-hash with the file path,
and does not rely on the value from the current buffer.
2022-06-13 16:01:56 -07:00
bbac208fda (feat): org-roam-property-* code duplication removed (#2217) (#2218)
Co-authored-by: Chris Langhans <chris@langhans-coding.de>
2022-06-10 17:08:25 -07:00
fcefc1b1b4 (db)fix: FOREIGN KEY error in narrowed buffer (#2215)
When trying to save from a narrowed buffer, only the Roam nodes visible
in the narrowed buffer are written to the database.

This commit ensures that org-roam behaves the same whether the current
buffer is narrowed or not.
2022-06-08 09:21:13 -07:00
0cd9b9e6d3 (fix)completion: ensure unique ref candidates (#2208)
Add invisible id to candidate strings to ensure each candidate is
unique, and completing-read doesn't get confused about which one to open.

Fix #2207
2022-06-05 13:53:29 -07:00
83a0b3d464 (db)fix: org-roam-db-connector group (#2209) 2022-05-28 12:37:47 -07:00
ed7d4f0a2e (feat): support custom minibuffer matching function in org-roam-node-find (#2177) 2022-05-27 20:21:44 -07:00
32557afdbf (chore)ci: /s/master/main (#2204) 2022-05-25 14:19:11 -07:00
f144941dfb (fix)capture: respect blank lines in capture templates (#2203) 2022-05-25 11:57:17 -07:00
01843a6486 (chore): reapply #2178 (#2197) 2022-05-16 09:40:37 -07:00
1f51ec91d5 (node): fix org-roam-node-at-point check (#2195)
org-roam-node-at-point returned the wrong value if point-min is a
level-1 heading node. We make sure that everytime we go up one
heading, the outline-level changes (reduces by 1) to prevent this error.
2022-05-15 16:51:38 -07:00
2657f0b444 Fix org-roam-extract-subtree (#2191)
* Fix undefined incf.

Calling org-roam-extract-subtree failes with "Symbol’s function definition is void: incf"

org-roam.el includes cl-lib. org-roam--h1-count uses a bare incf call, which is undefined. Fix this by using cl-incf.

* Save buffer before promoting it.

After fixing incf in 8ec2e59e67, org-roam-extract-subtree still fails. 

The error is now: org-roam-db--file-hash: Opening input file: No such file or directory,...

The buffer with the newly created content is still unsaved at this time, so save it before calling (org-roam-promote-entire-buffer)

Caveat is we now save the buffer two times, before and after promoting it.
2022-05-12 09:34:53 -07:00
455f139d3e Revert "(fix)db: update atime on file access (#2174)"
This reverts commit b2d9543fa2.
2022-05-11 22:19:05 -07:00
b2d9543fa2 (fix)db: update atime on file access (#2174)
Previously we only updated the database on file save, but we need to
update the file's atime on file access, so we hook into `find-file-hook`
to do so. We only update the file atime if the file exists in the file table.
2022-05-11 15:39:49 -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
b63ff2a7bb (chore): remove extraneous changelog line (#2172) 2022-04-24 18:44:58 -07:00
e8b4822a85 (perf)node-read: filter before map to candidate (#2168) 2022-04-24 17:12:22 -07:00
69116a4da4 v2.2.2 (#2171) v2.2.2 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
b948cfbe37 (github): remove commit from issue template 2022-04-16 20:34:49 -07:00
3716817618 (utils): add sqlite-connector to diagnostics output (#2162) 2022-04-16 20:32:57 -07:00
608feed855 Update FUNDING.yml 2022-04-16 20:27:34 -07:00