GNU bug report logs -
#62426
[PATCH] eshell: Add 'rgrep' builtin.
Previous Next
Reported by: Antero Mejr <antero <at> mailbox.org>
Date: Fri, 24 Mar 2023 21:03:01 UTC
Severity: normal
Tags: patch
Done: Antero Mejr <antero <at> mailbox.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 62426 <at> debbugs.gnu.org (full text, mbox):
Hello,
On Sat 25 Mar 2023 at 12:07PM -07, Jim Porter wrote:
> Even without Pcomplete support, there's still a benefit to a command
> like this though: you could use Eshell to pipe the results of 'M-x
> rgrep' to some other command. Looking at the code for 'eshell-grep', I
> don't think it'd be terribly difficult to support this case.
Can you give a concrete use case? If you're piping won't you typically
want to reuse your knowledge of traditional grep(1)? If I'm piping then
I'm probably thinking in non-Emacs terms.
> Maybe there should be a defcustom for this ("use M-x rgrep" vs "use
> /usr/bin/rgrep")? Or maybe it should be easier to configure various
> Eshell commands so they open in a compilation buffer when appropriate?
> You can do this now with an alias, but the syntax is a bit tricky:
>
> alias rgrep 'eshell-grep grep ${append (list "-rH") $*}'
>
> Something like this would be nicer:
>
> alias rgrep 'to-compilation-buffer rgrep -rH $*'
>
> That would make it easier for users to define their own commands that
> work like this, which would (probably) be generally useful and provide
> a partial solution for this bug while we consider the available
> options. (My main goal with doing this now is so that we don't merge
> something and then change our minds later, disrupting users' habits.)
A command-specific defcustom doesn't seem ideal because we could end up
with very many such things. Something like your compilation buffer idea
sounds good.
--
Sean Whitton
This bug report was last modified 1 year and 356 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.