help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I run grep-find from an elisp function?


From: Pieter van Oostrum
Subject: Re: How can I run grep-find from an elisp function?
Date: Thu, 18 Feb 2021 23:01:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (darwin)

BobD <daycandle@gmail.com> writes:

> Using Windows 7
> Emacs 27.1
>
> When I run grep-find, it displays this in the mini-buffer:
>  Q:/Cygwin/bin/find.exe . -type f -name '*' -exec Q:/Cygwin/bin/grep.exe -nH 
> -i "{}" ";"
>
> I insert a search string like this:
>  Q:/Cygwin/bin/find.exe . -type f -name '*' -exec Q:/Cygwin/bin/grep.exe -nH 
> -i blabba "{}" ";"
>
> How can I run grep-find with that from an elisp function?

Probably
(grep-find "Q:/Cygwin/bin/find.exe . -type f -name '*' -exec 
Q:/Cygwin/bin/grep.exe -nH -i blabba \"{}\" \";\""")

I don't have Windows, so I might have overlooked some Windows peculiarities. 
The above is translated from how it works on MacOS. Maybe the \" can be 
replaced by ' and/or \"{}\" by  \\{\\} or '{}'
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]