Subject: bug#22627: 25.1.50; Wishlist: It would be nice if the grep buffer had a history

From: Óscar Fuentes <[email-masked]>
Date: Sun, 03 Apr 2016 19:41:00 +0200

Lars Magne Ingebrigtsen <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>>> From: Lars Ingebrigtsen <[email-masked]>
>>> Date: Thu, 11 Feb 2016 16:52:14 +1100
>>> 
>>> `g' works fine for redoing, but it would be great if you could return to
>>> the previous (and next) with the normal `r'/`n' commands.
>>
>> We could have an optional feature whereby the Grep buffer is named
>> something like "*grep-the-command-line-used*".  Then as long as the
>> next Grep command is different, you will have a new buffer for its
>> output, and Bob's your uncle.

That's what ag.el (which drives the `ag' search command) does. For
instance:

*ag search text:foo dir:/home/oscar/bar*

which makes convenient locating an ag buffer by searched text and/or
directory. It tends to create large buffer names which don't play well
with tools that have a limited sprace for buffer names (ibuffer) but
otherwise it is useful.

> Having multiple grep buffers would also be a nice feature,

I do that with compilation-buffer-name-function.

[snip]