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

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

Re: finding stuff


From: Eduardo Ochs
Subject: Re: finding stuff
Date: Sat, 27 Feb 2021 14:33:29 -0300

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

To be honest I've never transferred grep arguments from a sexp
hyperlink to the M-x grep prompt, only the reverse... 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/*")

[[]], E. =)



reply via email to

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