unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Jim Porter <jporterbugs@gmail.com>
Cc: Antero Mejr <antero@mailbox.org>, 62426@debbugs.gnu.org
Subject: bug#62426: [PATCH] eshell: Add 'rgrep' builtin.
Date: Sat, 25 Mar 2023 10:22:07 -0700	[thread overview]
Message-ID: <87355syce8.fsf@athena.silentflame.com> (raw)
In-Reply-To: <d87b9ad1-49ca-ac4b-8f3d-3a74e8c927c3@gmail.com> (Jim Porter's message of "Fri, 24 Mar 2023 17:04:56 -0700")

Hello,

On Fri 24 Mar 2023 at 05:04PM -07, Jim Porter wrote:

> On 3/24/2023 2:02 PM, Antero Mejr via Bug reports for GNU Emacs, the Swiss
> army knife of text editors wrote:
>> eshell has builtins for agrep/egrep/fgrep that use the Emacs grep
>> feature, but rgrep is not included so it behaves differently. This patch
>> adds the rgrep builtin.
>
> Thanks, I think it would make sense to add an rgrep built-in to
> Eshell. However, I'm not sure if this is the best way for it to
> work. Personally, I'd have expected this to use the 'rgrep' function in Emacs
> Lisp (which uses find + grep to do its job). That's a bit different from
> /usr/bin/rgrep, but I find it a lot more useful since it ignores
> "uninteresting" files by default. For example, 'M-x rgrep' in a Git repo
> ignores the .git/ subdir, but /usr/bin/rgrep includes that subdir. Hence, I'd
> almost always prefer Emacs' version of rgrep.
>
> That said, it might be a bit strange for Eshell's rgrep to work this way, when
> Eshell's agrep/egrep/fgrep work like the external versions. This seems like a
> tricky case...

Tricky indeed.  Here is an attempt:

Normally with M-x rgrep one benefits from how Emacs prompts you
separately for the parameters to the function, right?  In particular,
you get completion for the second and third parameters.  Given that,
you're unlikely to want to type 'rgrep foo bar baz' into Eshell, and not
benefit from that completion, when you could just type M-x rgrep in the
same buffer, and benefit from it.

Given this, I suggest rgrep in Eshell should be /usr/bin/rgrep.

-- 
Sean Whitton





  reply	other threads:[~2023-03-25 17:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 21:02 bug#62426: [PATCH] eshell: Add 'rgrep' builtin Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-25  0:04 ` Jim Porter
2023-03-25 17:22   ` Sean Whitton [this message]
2023-03-25 19:07     ` Jim Porter
2023-03-30 21:19       ` Sean Whitton
2023-03-31  0:14         ` Jim Porter
2023-04-09  1:55     ` Jim Porter
2023-04-11  2:12       ` Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-11  4:01         ` Jim Porter
2023-06-03  1:41 ` bug#62426: (no subject) Antero Mejr via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87355syce8.fsf@athena.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=62426@debbugs.gnu.org \
    --cc=antero@mailbox.org \
    --cc=jporterbugs@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).