GNU bug report logs - #20719
25.0.50; grep-find-template has no <D> placeholder

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 2 Jun 2015 14:13:01 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20719 in the body.
You can then email your comments to 20719 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20719; Package emacs. (Tue, 02 Jun 2015 14:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 02 Jun 2015 14:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; grep-find-template has no <D> placeholder
Date: Tue, 02 Jun 2015 17:12:17 +0300
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20719; Package emacs. (Tue, 02 Jun 2015 14:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 20719 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 20719 <at> debbugs.gnu.org
Cc: "Kim F. Storm" <storm <at> cua.dk>
Subject: Re: bug#20719: 25.0.50; grep-find-template has no <D> placeholder
Date: Tue, 2 Jun 2015 17:28:08 +0300
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20719; Package emacs. (Tue, 02 Jun 2015 16:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 20719 <at> debbugs.gnu.org (full text, mbox):

From: Kim Storm <storm <at> cua.dk>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 20719 <at> debbugs.gnu.org
Subject: Re: bug#20719: 25.0.50; grep-find-template has no <D> placeholder
Date: Tue, 02 Jun 2015 18:11:36 +0200
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20719; Package emacs. (Tue, 02 Jun 2015 18:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 20719 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Kim Storm <storm <at> cua.dk>, 20719 <at> debbugs.gnu.org
Subject: Re: bug#20719: 25.0.50; grep-find-template has no <D> placeholder
Date: Tue, 2 Jun 2015 21:34:11 +0300
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20719; Package emacs. (Tue, 02 Jun 2015 21:20:03 GMT) Full text and rfc822 format available.

Message #17 received at 20719 <at> debbugs.gnu.org (full text, mbox):

From: Kim Storm <storm <at> cua.dk>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 20719 <at> debbugs.gnu.org
Subject: Re: bug#20719: 25.0.50; grep-find-template has no <D> placeholder
Date: Tue, 02 Jun 2015 23:19:10 +0200
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




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Wed, 03 Jun 2015 02:48:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Wed, 03 Jun 2015 02:48:03 GMT) Full text and rfc822 format available.

Message #22 received at 20719-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Kim Storm <storm <at> cua.dk>, 20719-done <at> debbugs.gnu.org
Subject: Re: bug#20719: 25.0.50; grep-find-template has no <D> placeholder
Date: Wed, 3 Jun 2015 05:47:10 +0300
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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 01 Jul 2015 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.