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

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

bug#23453: 25.0.93; dired-do-find-regexp does not work on Windows even a


From: Dmitry Gutov
Subject: bug#23453: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep
Date: Thu, 5 May 2016 04:18:28 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1

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.





reply via email to

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