all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Peter Povinec <spepo.42@gmail.com>
Cc: 55016@debbugs.gnu.org
Subject: bug#55016: 28.1; xref-find-references finds no matches if project dir contains a space
Date: Tue, 19 Apr 2022 20:32:48 +0300	[thread overview]
Message-ID: <834k2pugfz.fsf@gnu.org> (raw)
In-Reply-To: <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@mail.gmail.com> (message from Peter Povinec on Tue, 19 Apr 2022 10:06:28 -0700)

> From: Peter Povinec <spepo.42@gmail.com>
> Date: Tue, 19 Apr 2022 10:06:28 -0700
> Cc: 55016@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.





  reply	other threads:[~2022-04-19 17:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  4:52 bug#55016: 28.1; xref-find-references finds no matches if project dir contains a space Peter Povinec
2022-04-19  7:13 ` Eli Zaretskii
2022-04-19 17:06   ` Peter Povinec
2022-04-19 17:32     ` Eli Zaretskii [this message]
2022-04-19 17:36     ` Eli Zaretskii
2022-04-19 17:57       ` Peter Povinec
2022-04-19 18:17         ` Eli Zaretskii
2022-04-19 18:24           ` Eli Zaretskii
2022-04-24  2:00             ` Dmitry Gutov
2022-04-24  5:31               ` Eli Zaretskii
2022-04-25  2:08                 ` Dmitry Gutov
2022-04-25 11:48                   ` Eli Zaretskii
2022-04-26  2:05                     ` Dmitry Gutov
2022-04-26 12:00                       ` Eli Zaretskii
2022-04-26 12:28                         ` Dmitry Gutov
2022-04-26 12:36                           ` Eli Zaretskii
2022-04-27  1:57                             ` Dmitry Gutov
2022-04-27 13:53                               ` Eli Zaretskii
2022-04-26  1:05                 ` Peter Povinec
2022-04-26  2:07                   ` Dmitry Gutov
2022-04-26  4:57                     ` Peter Povinec
2022-04-26 11:18                       ` Eli Zaretskii
2022-04-26 12:30                         ` Dmitry Gutov
2022-04-27  3:00                           ` Peter Povinec
2022-10-31  1:00                             ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834k2pugfz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55016@debbugs.gnu.org \
    --cc=spepo.42@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.