unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* grep/dired
@ 2003-10-20  0:52 Mike Ballard
  2003-10-20  5:51 ` grep/dired Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mike Ballard @ 2003-10-20  0:52 UTC (permalink / raw)



Hi - 

Tried looking around but sort of don't know how to search for the answer -
when I open a dired buffer of other than ~/, then use M-x grep, it
searches files in ~/.  I'm pretty sure the reason is because in ~/.cshrc
the last thing I do is 'chdir $HOME' (which I don't want to change).  In
csh you can start a script with "-f" telling it to use current env - is
there a way to do the same thing for Emacs' grep so that it will grep on
the current dired buffer?  If possible I'd like to use grep and not
find-grep-dired.

Mike
-- 

mike.ballard--at--earthlink.net

  "Roses are red, violets are blue,
   I'm schizophrenic and so am I"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grep/dired
  2003-10-20  0:52 grep/dired Mike Ballard
@ 2003-10-20  5:51 ` Eli Zaretskii
  2003-10-20 17:24 ` grep/dired Kevin Rodgers
  2003-10-21  1:33 ` grep/dired Mike Ballard
  2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2003-10-20  5:51 UTC (permalink / raw)


> Newsgroups: gnu.emacs.help
> From: Mike Ballard <dont_w@nt_spam.org>
> Date: Mon, 20 Oct 2003 00:52:24 GMT
> 
> Tried looking around but sort of don't know how to search for the answer -
> when I open a dired buffer of other than ~/, then use M-x grep, it
> searches files in ~/.  I'm pretty sure the reason is because in ~/.cshrc
> the last thing I do is 'chdir $HOME' (which I don't want to change).

Then change your .cshrc to do that chdir only in interactive sessions.

In general, a shell startup file should take great care not to do
anything fancy, like stty etc., in non-interactive sessions; otherwise
you will see strange bugs in Emacs commands that invoke subsidiary
programs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grep/dired
  2003-10-20  0:52 grep/dired Mike Ballard
  2003-10-20  5:51 ` grep/dired Eli Zaretskii
@ 2003-10-20 17:24 ` Kevin Rodgers
  2003-10-21  1:33 ` grep/dired Mike Ballard
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2003-10-20 17:24 UTC (permalink / raw)


Mike Ballard wrote:

> Tried looking around but sort of don't know how to search for the answer -
> when I open a dired buffer of other than ~/, then use M-x grep, it
> searches files in ~/.  I'm pretty sure the reason is because in ~/.cshrc
> the last thing I do is 'chdir $HOME' (which I don't want to change).


Yes, you do.  :-)

> In
> csh you can start a script with "-f" telling it to use current env - is
> there a way to do the same thing for Emacs' grep so that it will grep on
> the current dired buffer?  If possible I'd like to use grep and not
> find-grep-dired.

You could try this hack: (setq shell-command-switch "-f -c")


-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: grep/dired
  2003-10-20  0:52 grep/dired Mike Ballard
  2003-10-20  5:51 ` grep/dired Eli Zaretskii
  2003-10-20 17:24 ` grep/dired Kevin Rodgers
@ 2003-10-21  1:33 ` Mike Ballard
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Ballard @ 2003-10-21  1:33 UTC (permalink / raw)



On Mon Oct 20, Mike Ballard disturbed my nap when he said:

> Hi - 
> 
> Tried looking around but sort of don't know how to search for the answer -
> when I open a dired buffer of other than ~/, then use M-x grep, it
> searches files in ~/.  I'm pretty sure the reason is because in ~/.cshrc
> the last thing I do is 'chdir $HOME' (which I don't want to change).  In
> csh you can start a script with "-f" telling it to use current env - is
> there a way to do the same thing for Emacs' grep so that it will grep on
> the current dired buffer?  If possible I'd like to use grep and not
> find-grep-dired.
> 

Alright, 2-0.  I changed ~/.cshrc.  Evidently two problems have now been
fixed :-)

Thanks both...

Mike
--

mike.ballard--at--earthlink.net

  "Roses are red, violets are blue,
   I'm schizophrenic and so am I"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-21  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-20  0:52 grep/dired Mike Ballard
2003-10-20  5:51 ` grep/dired Eli Zaretskii
2003-10-20 17:24 ` grep/dired Kevin Rodgers
2003-10-21  1:33 ` grep/dired Mike Ballard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).