unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Why does not rgrep use "grep -r"?
Date: Sun, 04 Nov 2007 01:57:55 +0100	[thread overview]
Message-ID: <878x5e25f0.fsf@kfs-lx.testafd.dk> (raw)
In-Reply-To: <87ve8k8dyw.fsf@catnip.gol.com> (Miles Bader's message of "Sat\, 03 Nov 2007 07\:44\:23 +0900")

Miles Bader <miles@gnu.org> writes:

> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>> If grep can do recursive searches then why not use that in rgrep?
>
> I don't know the reason of the rgrep authors (though I suspect it was
> portability concerns), 

Yes portability was definitely a concern.

When I first wrote the code years ago, grep -r wasn't widely supported,
so I wrote it to use find, xargs, and grep.

Later when I integrated rgrep into Emacs 22.1, I reworked quite a lot
of the existing grep & find stuff so that the old grep and grep-find, and
the new lgrep and rgrep commands could share a common code base.

Since both grep-find and my rgrep code used find/xargs/grep, I decided
to continue using them, even though grep -r could have been an alternative.

But I was still concerned about portability, and since using find
worked just nicely, I saw no reason to change.  Besides, as you and
others have noted, grep -r has severe performance problems on some
platforms.

It probably wouldn't be difficult to make it used grep -r (as an
_optional alternative_), but the current code works nicely and is well
tested, so why mess with it?

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2007-11-04  0:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02 21:42 Why does not rgrep use "grep -r"? Lennart Borgman (gmail)
2007-11-02 22:44 ` Miles Bader
2007-11-02 23:29   ` Andreas Schwab
2007-11-02 23:56     ` Lennart Borgman (gmail)
2007-11-03  1:31       ` Miles Bader
2007-11-03  1:45         ` Lennart Borgman (gmail)
2007-11-03  3:37           ` Miles Bader
2007-11-03  8:40             ` Eli Zaretskii
2007-11-03  9:43               ` David Kastrup
2007-11-03 11:01                 ` Eli Zaretskii
2007-11-03 11:54                   ` Lennart Borgman (gmail)
2007-11-04 18:59                   ` David Kastrup
2007-11-05  5:24                     ` Eli Zaretskii
2007-11-03  4:01         ` Ken Raeburn
2007-11-03  8:41           ` Eli Zaretskii
2007-11-03  8:37         ` Eli Zaretskii
2007-11-03 14:01   ` Stefan Monnier
2007-11-04  0:57   ` Kim F. Storm [this message]
2007-11-04  1:03     ` Lennart Borgman (gmail)
2007-11-04  1:15     ` Miles Bader
2007-11-04 10:32       ` Jason Rumney
2007-11-04 11:32         ` Lennart Borgman (gmail)
2007-11-04 11:48           ` Jason Rumney
2007-11-04 12:01             ` Lennart Borgman (gmail)
2007-11-05  5:22             ` Eli Zaretskii
2007-12-12  1:56 ` Lennart Borgman (gmail)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878x5e25f0.fsf@kfs-lx.testafd.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).