* bug#20719: 25.0.50; grep-find-template has no <D> placeholder
@ 2015-06-02 14:12 Dmitry Gutov
2015-06-02 14:28 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2015-06-02 14:12 UTC (permalink / raw)
To: 20719
Which goes counter to its docstring.
Instead, it just starts with 'find . ', and grep-expand-template, when
used with it, always ignores its DIR argument.
Why don't we replace all occurrences of ' . ' in grep-compute-defaults
with ' <D> '?
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
of 2015-06-02 on axl
Windowing system distributor `The X.Org Foundation', version 11.0.11601901
System Description: Ubuntu 14.10
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20719: 25.0.50; grep-find-template has no <D> placeholder
2015-06-02 14:12 bug#20719: 25.0.50; grep-find-template has no <D> placeholder Dmitry Gutov
@ 2015-06-02 14:28 ` Dmitry Gutov
2015-06-02 16:11 ` Kim Storm
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2015-06-02 14:28 UTC (permalink / raw)
To: 20719; +Cc: Kim F. Storm
Originally, it was present in the computed value of grep-tree-template.
But in the same commit that renamed it to grep-find-template
(2006-04-28, 0acfb7ce), "<D>" was replaced with ".".
Kim, do you remember why? The commit message doesn't seem to provide an
adequate explanation.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20719: 25.0.50; grep-find-template has no <D> placeholder
2015-06-02 14:28 ` Dmitry Gutov
@ 2015-06-02 16:11 ` Kim Storm
2015-06-02 18:34 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Kim Storm @ 2015-06-02 16:11 UTC (permalink / raw)
To: Dmitry Gutov, 20719
On 2015-06-02 16:28, Dmitry Gutov wrote:
> Originally, it was present in the computed value of grep-tree-template.
>
> But in the same commit that renamed it to grep-find-template
> (2006-04-28, 0acfb7ce), "<D>" was replaced with ".".
>
> Kim, do you remember why? The commit message doesn't seem to provide
> an adequate explanation.
>
I suppose it was because "rgrep" changes the default directory to the
specified "dir" before
running the find command - so "." seems to be TRT (and makes the command
shorter):
(let ((default-directory dir))
(compilation-start command 'grep-mode))
Kim
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20719: 25.0.50; grep-find-template has no <D> placeholder
2015-06-02 16:11 ` Kim Storm
@ 2015-06-02 18:34 ` Dmitry Gutov
2015-06-02 21:19 ` Kim Storm
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2015-06-02 18:34 UTC (permalink / raw)
To: Kim Storm, 20719
On 06/02/2015 07:11 PM, Kim Storm wrote:
> I suppose it was because "rgrep" changes the default directory to the
> specified "dir" before
> running the find command - so "." seems to be TRT (and makes the command
> shorter):
So there's no particular reason for that change?
`rgrep' can pass "." in just as well. However, `grep-find-template' can
be used outside of `rgrep', and the current value contradicts its docstring.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20719: 25.0.50; grep-find-template has no <D> placeholder
2015-06-02 18:34 ` Dmitry Gutov
@ 2015-06-02 21:19 ` Kim Storm
2015-06-03 2:47 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Kim Storm @ 2015-06-02 21:19 UTC (permalink / raw)
To: Dmitry Gutov, 20719
On 2015-06-02 20:34, Dmitry Gutov wrote:
> On 06/02/2015 07:11 PM, Kim Storm wrote:
>
>> I suppose it was because "rgrep" changes the default directory to the
>> specified "dir" before
>> running the find command - so "." seems to be TRT (and makes the command
>> shorter):
>
> So there's no particular reason for that change?
The reason is because it was TRT - but obviously not the best way to do
it...
>
> `rgrep' can pass "." in just as well.
>
Yes, that seems like a better way.
But I think the <D> entry in grep-expand-keywords should be changed to:
("<D>" . (or dir "."))
as a <D> entry should always insert a directory even if passed a nil arg
for DIR.
Kim
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#20719: 25.0.50; grep-find-template has no <D> placeholder
2015-06-02 21:19 ` Kim Storm
@ 2015-06-03 2:47 ` Dmitry Gutov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2015-06-03 2:47 UTC (permalink / raw)
To: Kim Storm, 20719-done
Version: 25.1
On 06/03/2015 12:19 AM, Kim Storm wrote:
>> `rgrep' can pass "." in just as well.
>>
> Yes, that seems like a better way.
Done.
> But I think the <D> entry in grep-expand-keywords should be changed to:
>
> ("<D>" . (or dir "."))
>
> as a <D> entry should always insert a directory even if passed a nil arg
> for DIR.
Sounds ok to me. Even though it makes the last argument to
rgrep-default-command look superfluous.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-03 2:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 14:12 bug#20719: 25.0.50; grep-find-template has no <D> placeholder Dmitry Gutov
2015-06-02 14:28 ` Dmitry Gutov
2015-06-02 16:11 ` Kim Storm
2015-06-02 18:34 ` Dmitry Gutov
2015-06-02 21:19 ` Kim Storm
2015-06-03 2:47 ` Dmitry Gutov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.