LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-26-2005, 05:24 PM   #1
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Grep in emacs


Can anyone here please explain to me how to make M-x grep work?

M-x grep<enter>
Gives me
Run grep (like this): grep -n <cursor>

I've been trying "sub*{$" (which is the regxp I'd like it to find for me) in the minibuffer where it drops the cursor, so the complete string is:

Run grep (like this): grep -n 'sub*{$'

But that gives me
Code:
cd c:/pathname-to-current-buffer/
grep -n 'sub*{$' NUL
'grep' is not recognized as an internal or external command,
operable program or batch file.

grep finished with no matches found at Tue Apr 26 18:15:19
in the *grep* buffer, which needless to say, is less than helpful.

What's the "NUL" doing in there? How do I search the current buffer and not some external file which doesn't concern me at all?

Apparently the logical command, `M-x grep -n 'sub*{$'` isn't an option, as a space after "grep" makes emacs think that I'm trying for an autocomplete of grep-find.

This is remarkably infuriating, and I'll be eternally thankful to anyone who can just explain to me how this works.

Thanks!
 
Old 04-26-2005, 09:19 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
this looke like a windows system -- you will have to have grep on your executable PATH using cygwin or however you do it
 
Old 04-26-2005, 09:39 PM   #3
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Yeah, I've been reading up on how to make grep work and someone that it has to be installed separately.Silly me, I just assumed that if emacs gave you the capability to do something it would also include the functionality >_<

*grumble* hate windows *grumble*

I'll get cygwin on here and get back to this thread once that's done, thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
where is the .emacs file in the emacs source code tarball? aizkorri Programming 2 01-13-2007 02:05 PM
grep ?? can grep us variables? DaFrEQ Linux - Software 4 09-14-2005 12:22 PM
emacs not responding to .emacs file in Mandriva 2005 LE. Please help LaptopLinux Mandriva 1 06-08-2005 08:36 AM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM
ps -ef|grep -v root|grep apache<<result maelstrombob Linux - Newbie 1 09-24-2003 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration