help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding stuff


From: Tomas Hlavaty
Subject: Re: finding stuff
Date: Sun, 28 Feb 2021 00:25:27 +0100

On Sat 27 Feb 2021 at 14:33, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> On Sat, 27 Feb 2021 at 05:36, Tomas Hlavaty <tom@logand.com> wrote:
>> I get this:
>>
>> (let ((default-directory "~/git/notes/"))
>>   (grep nil)
>>   )
>>
>> Maybe evaluating grep form does not add it to grep-history?
>
> It doesn't! See:
>
>   (find-efunction 'grep)
>   (find-efunction 'grep "read-shell-command")
>   (find-efunction 'read-shell-command)
>   (find-efunction 'read-shell-command "read-from-minibuffer")
>   (find-efunctiondescr 'read-from-minibuffer)
>   (find-efunctiondescr 'read-from-minibuffer "add-to-history")

Interesting, thanks for the pointers.

I found that in addition to grep-history there is also
grep-find-history.

Maybe it should not take the argument from grep-history but from the 4th
line of the grep buffer.

> To be honest I've never transferred grep arguments from a sexp
> hyperlink to the M-x grep prompt, only the reverse...

I did not transfer anything.  I evaluated (grep "...") and then pressed
M-h M-h and then I got (grep nil) in the links buffer.

> I find much easier to edit the arguments in a "real"/"normal" Emacs
> buffer than in the minibuffer - and, btw, I almost always duplicate
> the sexp hyperlink with M-h M-2 before editing it, and this lets me
> have my recent grep-history all in sight, in an format like this:
>
>   (find-ghcgrep "grep --color -nRH --null -e  foldr   libraries/base/*")
>   (find-ghcgrep "grep --color -nRH --null -e 'foldr ' libraries/base/*")

Interesting, I'll try that.

M-h M-2 is not bound in (eev-beginner) so I might be getting advanced:-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]