Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I use grep with Emacs?

Emacs GREP
0
Posted

How do I use grep with Emacs?

0

To use grep with Emacs, you first need to obtain a version of grep. Many of the packages listed in the section below on Unix Tools come with a version of grep (and cousins egrep and fgrep). Once you have grep, be sure that it is in your system path or in Emacs’ exec-path. Then you should be able grep from within Emacs using “M-x grep”. If you can’t get access to grep, then you can use the findstr program that comes with Windows NT and Windows 95 instead. It is much more limited in its searching ability, but if you have simple needs it may be adequate. Peter Breton shows you how to do this. Some users find the igrep package to be a more useful package for using grep (for example, it supports recursive greps directly). Here are some pointers from other users on what you need to do to get igrep working on your system. You can download igrep from the elisp archive at http://mirrors.sunsite.dk/gnu/elisp-archive/misc/igrep.el.gz.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.