You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When constructing the ripgrep shell command for grepping unlinked references, each title (and aliases) of that node gets sanitized by shell-quote-argument, which (properly) escapes quotes. However, escaped single quote “breaks” the constructed ripgrep shell command, since the regex gets expanded within single-quoted argument. For example, for title/alias of “Don’t Repeat Yourself” and “DRY”, the generated ripgrep command looks like this:
Since an escaped single quote cannot appear within single quoted token (in Bash, at least), this command appears to silently fail, and the unlinked references section produces empty result because of this.
A solution may be to use double quotes to wrap the constructed regex. There, escaped characters, including single quote, should be interpreted as intended. A PR implementing a fix may follow.
Steps to Reproduce
Create a node with title text including single quote character (')
Visit that node with org-roam
Run org-roam-buffer-toggle
See that no entries appear under the Unlinked References section
Backtrace
No error occurs that produces a backtrace. The issue appears to be silently ignored.
Expected Results
A list of node filename and the paragraph including the node title text/aliases will appear.
Actual Results
No entries appear under the Unlinked References section of the Org Roam buffer.
Environment
Emacs: GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0)
of 2024-01-18
Framework: N/A
Org: Org mode version 9.7-pre (release_9.6.15-1044-gaab2c9 @ /home/taro/.config/emacs/straight/build/org/)
Org-roam: v2.2.2-44-g8667e44-dirty
sqlite-connector: sqlite-builtin
The text was updated successfully, but these errors were encountered:
Description
When constructing the ripgrep shell command for grepping unlinked references, each title (and aliases) of that node gets sanitized by
shell-quote-argument
, which (properly) escapes quotes. However, escaped single quote “breaks” the constructed ripgrep shell command, since the regex gets expanded within single-quoted argument. For example, for title/alias of “Don’t Repeat Yourself” and “DRY”, the generated ripgrep command looks like this:Since an escaped single quote cannot appear within single quoted token (in Bash, at least), this command appears to silently fail, and the unlinked references section produces empty result because of this.
A solution may be to use double quotes to wrap the constructed regex. There, escaped characters, including single quote, should be interpreted as intended. A PR implementing a fix may follow.
Steps to Reproduce
'
)org-roam-buffer-toggle
Backtrace
No error occurs that produces a backtrace. The issue appears to be silently ignored.
Expected Results
A list of node filename and the paragraph including the node title text/aliases will appear.
Actual Results
No entries appear under the Unlinked References section of the Org Roam buffer.
Environment
of 2024-01-18
The text was updated successfully, but these errors were encountered: