GNU bug report logs -
#23453
25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep
Previous Next
Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>
Date: Wed, 4 May 2016 19:42:02 UTC
Severity: normal
Found in version 25.0.93
Done: Kaushal Modi <kaushal.modi <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 05/05/2016 01:30 AM, Kaushal Modi wrote:
> Convert IGNORES and DIR to a list of arguments for ’find’.
> IGNORES is a list of glob patterns. DIR is an absolute
> directory, used as the root of the ignore globs.
>
> If DIR is going to be an argument to `find', it should be shell quoted
> too, right?
That doesn't mean that it isn't being quoted now, in the function in
question.
> Or how about this 3rd version of the patch:
It's functionally equivalent to the second one, I believe.
> It feels untidy to shell-quote dir separately; once in the
> grep-expand-template form and second time inside
> xref--find-ignores-arguments. Also it could get confusing keeping track
> of if dir was already shell-quoted by the time it entered
> xref--find-ignores-arguments or not.
shell-quoting is the last thing you do to an argument. Quoting an then
transforming it rarely makes sense.
> A comment in that last function also says:
>
> ;; `shell-quote-argument' quotes the tilde as well.
> (cl-assert (not (string-match-p "\\`~" dir)))
>
> So looks like dir is expected to be shell-quoted before it entered that
> function.
Actually, this comment means the opposite: we would want ~ in the
command line unquoted, but that won't happen because DIR is quoted
later. So we require DIR to be non-abbreviated.
Anyway, let's leave that off until you find a definite case where it's a
problem. I've pushed the other change now in ab3ba91.
Please see if it fixes the problem, and if so, close the bug.
This bug report was last modified 9 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.