Comments (8)
I wondered if it might be a difference between rg 13.0.0 and rg 12.1.1 but the output looks the same given the same input.
from rg.el.
Thanks for the detailed report. I have no official support for Mac and no way to test so can't help much here, more than give some pointers for you to start debugging yourself.
Ripgrep 13 should not be a problem in general since that is what is currently running in CI. Would be interesting if it reproduces on 12.1.1 on Mac and/or on emacs 27 on Mac for instance. That may give some leads.
I would also test if other compilation-mode
derived modes work, like grep.el
, or running the same ripgrep command via M-x compile
.
grep.el
should support ripgrep these days, not sure if that made it into emacs 28 but if so, there should be some setting for it. So that would also be interesting to try since grep.el
and rg.el
are fairly similar in the architecture.
from rg.el.
Thanks for the troubleshooting tip!
It appears that compile
never finishes. It stays like this indefinitely:
Interestingly, M-x grep
seems to work. Given the same test directory & files, I can type M-x grep birds * <ENTER>
with these results:
I'm going to see what else I can find out.
from rg.el.
I was able to install 27.1 on mac via homebrew, also disabling the native compilation to remove one more difference between platforms. Same behavior as reported.
ALso tried removing that and downloading the 28.1-4 binary from https://emacsformacosx.com/
Same behavior
from rg.el.
Here's a minimal repro:
M-x compile <ENTER> rg -e hello
That hangs in the "Compiling" state, never shows any output. But only on my mac.
With any file or directory arg, it completes (either with matches or without, but it completes):
M-x compile <ENTER> rg -e hello .
Any tips on debugging why compile gets stuck?
Is it possible it's waiting for EOF on stdin?
M-x compile <ENTER> grep -e hello
similarly hangs, but that's expected because it looks at stdin if no files are specified.
man ripgrep
says this:
ripgrep will automatically detect if stdin exists and search stdin for a regex
pattern, e.g. ls | rg foo. In some environments, stdin may exist when it shouldn’t. To
turn off stdin detection explicitly specify the directory to search, e.g. rg foo ./.
Similarly, if I copy the exact command line that's run by M-x rg
, add a directory to the end, and pass that to M-x compile
then it gets results.
from rg.el.
Ah, great debugging. There is a fix for this on windows, maybe the same is needed for os X unless there is something specific with your system that is causing this behavior.
Anyway, try changing 'windows-nt
to 'darwin
in this line and see how it works.
A bit peculiar that no one else has reported this on for Mac but I think we could try this as a general solution if it works for you and handle any potential regressions if they show up.
from rg.el.
That works!! Thanks for the quick responses!
I can ask around if I know anybody else willing to test it. So far the other mac emacs users I know are using other search packages.
from rg.el.
I reverted my local change and pulled latest master and it's working great now! THank you!!
from rg.el.
Related Issues (20)
- Would be nice if DWIM modes prompt for search string if no word at point HOT 3
- Question on searching and removing the whole line HOT 1
- Wgrep fails with "There are n unapplied changes. (0 changed)" HOT 1
- Result-based navigation fails HOT 3
- Question about using glob pattern with rg HOT 1
- Feature request: search symlinked file, but make the file path in "*rg*" buffer the path of the symlink HOT 6
- Comparison with Deadgrep? HOT 1
- Expose search history more prominently HOT 1
- project.el issue HOT 2
- support project.el external roots HOT 1
- When copying from buffer `*rg*`, some internal text is included HOT 1
- How to make "enter" key open target file at the location of the searched keyword? HOT 1
- option to choose rga HOT 1
- Feature request: Option to runcate long search terms in header line
- Feature request: Support `rg-rerun-change-project` in rg-mode
- Support search compressed files such as `.el.gz`?
- Any reason of adding `.` at the end of command on Windows? HOT 2
- Help wanted: how to get rg-match result position ? HOT 1
- Is there way to set default searching directory dynamically? HOT 1
- Have rg commands return ripgrep's exit code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rg.el.