Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project dir contains a space

From: Eli Zaretskii <[email-masked]>
Date: Sun, 24 Apr 2022 08:31:48 +0300

> Date: Sun, 24 Apr 2022 05:00:09 +0300
> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> Hi Eli,
> 
> Sorry for the slow reply.

No sweat.

> Nowadays, though, that function has come full circle with in 
> 71f8b55f46a, for various reasons, including macOS having a very old 
> version of 'find'. Note that we fixed this particular bug in ab3ba912fc7.
> 
> symref/grep.el doesn't use ignore instructions, though, so it can easily 
> use either approach.
> 
> Due to how semantic-symref-* defmethods are currently structured, 
> though, the current xref-matches-in-directory's approach seems like more 
> of a pain: semantic-symref-parse-tool-output-one-line cannot use lexical 
> context from semantic-symref-perform-search (where we would bind a 
> local-dir variable once to subsequently use when parsing every line). A 
> dynamic var seems to work, though.
> 
> With we could avoid having to use 'substring'. That should lead to a 
> little less consing. No idea how, though.

Thanks.  Peter, can you try the patch proposed by Dmitry and see if it
works in your case?

> (Should this also use 'file-name-unquote'?)

I'm not sure I follow: where would we use that and for what purpose?