GNU bug report logs -
#27239
25.1; grep: current symbol substitutes part of grep-command
Previous Next
Full log
View this message in rfc822 format
Yuri Khan <yuri.v.khan <at> gmail.com> writes:
> $ emacs -Q
>
> (setq grep-command "git --no-pager grep --no-index -Hn -E -e ") C-x C-e
> (setq grep-use-null-device nil) C-x C-e
>
> M-x grep RET
>
> ⇒ Run grep (like this): git --no-pager grep --no-index -Hn -E -e
>
> <down>
>
> ⇒ Run grep (like this): git --no-pager '' --no-index -Hn -E -e
>
> Observed behavior: ‘grep’ takes the last command from the history and
> replaces the first argument that does not start with a hyphen-minus with
> the current symbol. This is not documented anywhere.
(This bug report unfortunately didn't get any response at the time.)
This behaviour is still present in Emacs 28.
> Expected behavior: It would probably make sense to just generate the new
> command by concatenating ‘grep-command’ and the current symbol, without
> any heuristics to remove the search pattern from the previous command.
Yes, I think so, too. Anybody have an opinion here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.