Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using GNU Emacs 23 for Windows (running on Windows 7 64-bit) and I'd like to be able to use search functions like M-x find-dired and M-x find-grep-dired.

The only Unix-like environment I am allowed access to is Services for Unix Applications (SUA, also known as Interix).

Has anyone managed to get this to work?

FWIW, I've tried creating a batch script called bash.bat with the following contents:

c:\Windows\posix.exe /u /c //usr//local//bin//bash -l %*

This produces the following output, when executed in emacs using M-x find-dired

c:/Users/matthewd/:
find . \( _emacs \) -exec ls -ld \{\} \;
...    
c:\Users\matthewd>c:\Windows\posix.exe /u /c //usr//local//bin//bash -l -c "find . \( _emacs \) -exec ls -ld \{\} \;" ...
Welcome to the SUA utilities.

DISPLAY=localhost:0.0
find: _emacs: unknown option

find exited abnormally with code 1 at Fri May 13 16:25:20
share|improve this question

Why don't you open a shell (ksh, tcsh or bash) and run find and/or grep directly? It would be a lot easier because then the login environment gets set and you won't then be getting those errors.

You'll find a link in the Start menu under "Subsystem for Unix-based Application" to the shells.

If you want to use bash you can get it from the SUA Community site (along with hundreds of other additional programs for free).

share|improve this answer
    
I already run find/grep from the shell, but I'm trying to get it working under Emacs. The login environment doesn't really have anything to do with my issue, neither does the availability of bash (which I already have installed). – MatthewD May 19 '11 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .