[Top][All Lists]

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

Re: META-x grep question

From: FCC
Subject: Re: META-x grep question
Date: Wed, 21 Apr 2004 16:20:28 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316

Brian Johansen wrote: wrote:

Brian Johansen wrote:

Hi !

Does anyone know how to change the default arguments when using the grep
command within emacs ??
When choosing META-x grep
It defaults to grep -n -e
and I want it to: grep -n -e <search text> '*.[ch]'
and possibly set the cursor at <search text> ready for input.

Is that possible ?? and how ?



I also changed the default. It's in the customization screens under "Options." Wish I could remember exactly where.


Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical Consumers" and "Boring Stories from Uncle Rod." Both are available at

To reply by e-mail, take the extra "o" out of the name.

Thanks ! That works !
Do you know if one could put it in the .emacs file instead ??


I have in my _emacs file a section called custom-set variables, and there I have many entries along with:

'(grep-command "grep --regexp=\"\\B!.*\" --only-matching --no-filename FNAME.f90")

which basically displays all the comments in file FNAME.f90. You can edit anything inside "".


reply via email to

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