Code Monkey home page Code Monkey logo

Comments (4)

jimporter avatar jimporter commented on June 3, 2024

This works fine for me. Emacs already expands default-directory as necessary before starting the child process. (For example, if I call M-x compile cd RET on Windows under $HOME, it correctly prints c:\Users\user\....) I've also tried using find+grep on Windows (which is what I have installed) via Urgrep, and it searches under my home directory correctly.

Urgrep isn't doing anything special with the default-directory here, other than what compilation-mode does. So if there's a bug here, I don't see how it could be in this package. It's likely in one of:

  1. Your configuration (try emacs -Q -l /path/to/urgrep.el to see if it still happens?)
  2. Emacs itself (try running M-x compile and entering your Ripgrep command to see what happens)
  3. Ripgrep

from urgrep.

elge70 avatar elge70 commented on June 3, 2024

I use project.el to open the project and files. I use ripgrep to search for pattern and it is not working. The project stores the path of project in .emacs.d/projects file as "~/Repo" etc. That could be the problem. This problem is not seen if I am using consult-ripgrep. This can be reproduced with ugrep also.

from urgrep.

jimporter avatar jimporter commented on June 3, 2024

I use project.el to open the project and files. I use ripgrep to search for pattern and it is not working. The project stores the path of project in .emacs.d/projects file as "~/Repo" etc. That could be the problem. This problem is not seen if I am using consult-ripgrep. This can be reproduced with ugrep also.

The actual value of default-directory should already be expanded, so I strongly doubt that the ~ has any effect.

I believe the issue you're seeing is this: BurntSushi/ripgrep#951. I guess that means that Urgrep needs a special-case for ripgrep to always include a directory as an explicit command argument, else it will hang waiting for stdin that never arrives (but only on Windows, since Emacs can't use PTYs to communicate with child processes there).

from urgrep.

jimporter avatar jimporter commented on June 3, 2024

@elge70 Could you try this branch to see if things work? https://github.com/jimporter/urgrep/tree/ripgrep-windows

from urgrep.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.