GNU bug report logs -
#55016
28.1; xref-find-references finds no matches if project dir contains a space
Previous Next
Reported by: Peter Povinec <spepo.42 <at> gmail.com>
Date: Tue, 19 Apr 2022 04:59:02 UTC
Severity: normal
Found in version 28.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Peter Povinec <spepo.42 <at> gmail.com>
> Date: Tue, 19 Apr 2022 10:06:28 -0700
> Cc: 55016 <at> debbugs.gnu.org
>
> > I'm running half-blind here, because you didn't tell which Xref
> > backend is being used for this (do you have ID Utils or GNU Global or
> > Cscope installed and used for the above recipe?). My guess is that
>
> Sorry, should have mentioned that the recipe is with 'emacs -Q',
> no special backends.
The backend is independent on your customizations, it depends on the
tools you use in the tree. For example, if Emacs finds a file named
"ID", it assumes you use ID Utils.
> > Emacs uses the default "find | grep" to do the search, in which case
> > the patch below should help; does it?
> >
> > diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el
> > index 27ea80f..bc96505 100644
> > --- a/lisp/cedet/semantic/symref/grep.el
> > +++ b/lisp/cedet/semantic/symref/grep.el
> > @@ -124,7 +124,7 @@ semantic-symref-grep-use-template
> > grep-find-template)
> > pattern
> > filepattern
> > - rootdir)))
> > + (shell-quote-argument rootdir))))
> > cmd))
> >
> > (defcustom semantic-symref-grep-shell shell-file-name
>
> The patch actually makes it worse. Now even the 'nospacedir' case fails
> the same way (steps 6 and 7 in my recipe).
I guess I will then have to ask you to show the find/grep command we
are generating in that function, before the patch. (You could do that
by stepping through the code with Edebug.) It is hard for me to
simulate your recipe because it requires symlinks, and without that I
can only guess what's going on there.
My guess so far was that we produce a command that looks something
like
find <DIRECTORY> ... | grep ...
in which case quoting <DIRECTORY> should fix your problem. But I'm
probably missing something.
Thanks.
This bug report was last modified 2 years and 262 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.