-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
counsel-rg fails with \b #2795
Comments
WFM:
("rg" "-M" "240" "--with-filename" "--no-heading" "--line-number" "--color" "never" "-i" "\\bfoo\\b") This is with latest Ivy/Counsel with the following Emacs versions:
Does doubling the backslash have any effect?
Clearly something is applying Can you try reproducing the issue from |
Turns out it's prescient who's adding More precisely, when search for rg --with-filename --no-heading --line-number --color never --max-filesize 1M --max-columns 233 --max-columns-preview -i '\(\?\:\(\?\:u\[\̀-\̄\̆\̈-\̌\̏\̑\̛\̣\̤\̨\̭\̰\]\|\[u\ù-\ü\ũ\ū\ŭ\ů\ű\ų\ư\ǔ\ǖ\ǘ\ǚ\ǜ\ȕ\ȗ\ᵘ\ᵤ\ṳ\ṵ\ṷ\ṹ\ṻ\ụ\ủ\ứ\ừ\ử\ữ\ự\ⓤ\u\𝐮\𝑢\𝒖\𝓊\𝓾\𝔲\𝕦\𝖚\𝗎\𝘂\𝘶\𝙪\𝚞\]\)\(\?\:s\[\́\̂\̇\̌\̣\̦\̧\]\|\[s\ś\ŝ\ş\š\ſ\ș\ˢ\ṡ\ṣ\ṥ\ṧ\ṩ\ẛ\ₛ\ⓢ\ſt\s\𝐬\𝑠\𝒔\𝓈\𝓼\𝔰\𝕤\𝖘\𝗌\𝘀\𝘴\𝙨\𝚜\]\)\(\?\:e\[\̀-\̄\̆-\̉\̌\̏\̑\̣\̧\̨\̭\̰\]\|\[e\è-\ë\ē\ĕ\ė\ę\ě\ȅ\ȇ\ȩ\ᵉ\ḕ\ḗ\ḙ\ḛ\ḝ\ẹ\ẻ\ẽ\ế\ề\ể\ễ\ệ\ₑ\ℯ\ⅇ\ⓔ\e\𝐞\𝑒\𝒆\𝓮\𝔢\𝕖\𝖊\𝖾\𝗲\𝘦\𝙚\𝚎\]\)\[\\\﹨\\\]\(\?\:b\[\̇\̣\̱\]\|\[b\ᵇ\ḃ\ḅ\ḇ\ⓑ\b\𝐛\𝑏\𝒃\𝒷\𝓫\𝔟\𝕓\𝖇\𝖻\𝗯\𝘣\𝙗\𝚋\]\)\|use\\b\|\\bu\\w\*\\W\*\\bs\\w\*\\W\*\\be\\w\*\\W\*\\b\\\\\\w\*\\W\*\\bb\\w\*\)' which returns this error:
So ultimately this seems to be an incompatibility between Found some similar issues but they're either fixed bug or have different cause: radian-software/prescient.el#19 BTW, @basil-conto you're amazing to respond the issue within a day! |
What do you mean? By default
Maybe, but that's not what the error is saying. In your examples the whole regexp is quoted/escaped for use in the shell, i.e. Could you try tracing whether |
without loading prescient and ivy-prescient:
|
Thanks. So is there anything Counsel can do here, or can this issue be closed? |
Closing for now. Looks like |
Found a workaround: ivy-prescient can enable candidate filtering and sorting separately, I can disable filtering to avoid this char-fold issue, while still have sorting (place recently used and frequently used entries on top), which is my favorite feature of prescient. |
If you can identify in which corner cases |
I'm trying to search
\bsource\b
with counsel-rg, without the\b
s, it works fine, but with\b
s it says "ERROR CODE 2". The same search string works if I use counsel-ag.I saw in other issues that
ivy-prescient
may be in the way, I tried to move counsel-rg in/outivy-prescient-sort-commands
, but no luck.counsel--async-last-command
for counsel-rg:for counsel-ag:
rg --version
:ag --version
:OS: MacOS Catalina 10.15.7
The text was updated successfully, but these errors were encountered: