GNU bug report logs - #55016
28.1; xref-find-references finds no matches if project dir contains a space

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Peter Povinec <spepo.42@HIDDEN>; Keywords: moreinfo; dated Tue, 19 Apr 2022 04:59:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 12:36:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 08:36:39 2022
Received: from localhost ([127.0.0.1]:37419 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njKQp-0002aS-4J
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:36:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45422)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1njKQn-0002aF-PW
 for 55016 <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:36:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59350)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1njKQi-0004Mx-Cc; Tue, 26 Apr 2022 08:36:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=N0xBlfmkhC0UyAo9gioN7RPhyse3yzEs7hebzTlDiok=; b=E//AgOKSrHgm
 5hPaIvHFXVF5bMG1+jJdq/GCjzuKw7NmT4zj81vop5LQx3mVKXk+J5PBc4lWC+RyGzQswjvNPP5Jd
 btsiirYrnr3+BRhhMOthP8C2VT3BUuNmZcQyYCNdq078Lg7Yxaw5PVZT/RDO7Gmjr8kkmnEYLsUUG
 DGmvlnN0MvDI6Rz885WDLOZmBK1KUusccsjlTzF6yAb3c90/ktieCNeNWoBe/Jk+A2WOUwd1CsiZH
 u246vlsLHNrvkeDDjXpx1bQXcQyQ1lRU/5QRGQ4w269tNFCpAIlORYETtpVfTvyByykvznOM4iy5S
 mPBwSXDZVMPUjqIb1ymN4Q==;
Received: from [87.69.77.57] (port=1243 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1njKQg-0006XZ-Sr; Tue, 26 Apr 2022 08:36:32 -0400
Date: Tue, 26 Apr 2022 15:36:18 +0300
Message-Id: <83y1zskon1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <298c6f92-8d09-2254-82a4-403b56328fc0@HIDDEN> (message from
 Dmitry Gutov on Tue, 26 Apr 2022 15:28:57 +0300)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN> <83v8uxmljj.fsf@HIDDEN>
 <5e6b8f45-0db1-1c4e-20a0-939c3d8f5b69@HIDDEN> <834k2gm4v2.fsf@HIDDEN>
 <298c6f92-8d09-2254-82a4-403b56328fc0@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 26 Apr 2022 15:28:57 +0300
> Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
> From: Dmitry Gutov <dgutov@HIDDEN>
> 
> On 26.04.2022 15:00, Eli Zaretskii wrote:
> > If we just show those file names in some window, they don't need to be
> > re-quoted, I think.  Quoting is only needed if the resulting file
> > names will be passed to Lisp APIs to act on them.
> 
> They are not just shown. The file names are used when the user tries to 
> visit the reference (e.g. with RET).

Which command is invoked by RET in those cases?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 12:30:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 08:30:44 2022
Received: from localhost ([127.0.0.1]:37390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njKL6-0002QZ-Cp
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:30:44 -0400
Received: from mail-wr1-f51.google.com ([209.85.221.51]:40819)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1njKL5-0002QN-Fb
 for 55016 <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:30:43 -0400
Received: by mail-wr1-f51.google.com with SMTP id e2so18971377wrh.7
 for <55016 <at> debbugs.gnu.org>; Tue, 26 Apr 2022 05:30:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=jkYmHhcjwFxYtq1JIjSVkbhJUes0I672rernB+sxyxM=;
 b=MosBauvEBW1MKfDGwynmoXvF4Yx4DThCuvmmTSmvOwRetxOxk+B9xpgm3ILNnTsryD
 k2P1uhsrAJd1xUJxbqbrk2gtKVyMvjETdkgqOyWvOi3L0D0Rcg2sKTvLEZhr1lM7RPV+
 3MdDE75oS+QGh4vK+6BICZyT93mcNeuRiAswCus0C+VqtPn60QlBt+/g3pu3kC1MncTc
 tdvkIU4aBymoJuDu9kcYIWS0KLXlVzGtOGLDlCHph6rpv2PfHqQRde0crLhHRqsR29Yc
 uP4Etptcj0FPiUpC5sLdECFugMXsskecDPXo1RzwUH/9KXOPx8O6qHVVLH+dqHmkbjdY
 ba8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=jkYmHhcjwFxYtq1JIjSVkbhJUes0I672rernB+sxyxM=;
 b=OJGflxew3spQt+OWQF60XLX7ok60ZkPp18z7R6/qnjR9XXIGW2rjc4pwM+CuYdB03N
 38JKub3McF+HwG4nTz4xx7beK+nXtuU26oEuhV49/ST46n6HbNoF5blM60e2ugq13xCv
 yuzfwWqQWpILerOzjL3BAIRg15kWMBWAIO9ZLw+ERmBWXNbKl3qok4AI03ZU0L1DkGlW
 ejoBrkD78dnIR70xALgRmgChpI5zKbibIuqSCReJQPevgMvBIwKYkJZ1OXH5z1u6zN8G
 tOXbWwShTY13+aaHGn3yoGVUdIcObSIxRGybyAiRv+MLnF76mdnpUbxuhifGFMeNaE4/
 DKhw==
X-Gm-Message-State: AOAM5300zjU39021Lkcd5sNCBa5lD8jGzQ2KIRL3V613WAwMvsyFai+a
 59aOaxfVBh2BABYKTczEKvFSnKVAzTQ=
X-Google-Smtp-Source: ABdhPJyvG3EL9a3cJBG5PSvCX0D+vKMp/F8XwHNwYZAuXZnQvQmTWT33SwPQOdVva2QDSpcW+roJeA==
X-Received: by 2002:a5d:6daf:0:b0:20a:dd36:7296 with SMTP id
 u15-20020a5d6daf000000b0020add367296mr7058241wrs.274.1650976237777; 
 Tue, 26 Apr 2022 05:30:37 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 r7-20020a05600c2c4700b0038eb7d8df69sm10851740wmg.11.2022.04.26.05.30.36
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 26 Apr 2022 05:30:37 -0700 (PDT)
Message-ID: <2207272e-6b19-1354-4816-e2a505fd6b3a@HIDDEN>
Date: Tue, 26 Apr 2022 15:30:36 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>, Peter Povinec <spepo.42@HIDDEN>
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <CAJDw7KseZso8PN_L3bf4vW-Dc8WbpMVfT7xQmXYa7Uy432xOJA@HIDDEN>
 <46536fae-4122-6994-99d0-d5f79af22aba@HIDDEN>
 <CAJDw7Kvzwyg9BefivM2wmh+TEBWLFE=uJDHhaksq-4DL8ppVBA@HIDDEN>
 <838rrsm6tf.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <838rrsm6tf.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 26.04.2022 14:18, Eli Zaretskii wrote:
> I'm curious what does Dmitry think about this consequence of the
> change.

I think Peter is saying that the patch made the file names displayed in 
the abbreviated form, not vice versa.

Which seems like a good change (more compact display).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 12:29:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 08:29:08 2022
Received: from localhost ([127.0.0.1]:37368 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njKJY-0002Lo-79
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:29:08 -0400
Received: from mail-wm1-f53.google.com ([209.85.128.53]:33008)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1njKJW-0002LL-4s
 for 55016 <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:29:06 -0400
Received: by mail-wm1-f53.google.com with SMTP id
 p7-20020a05600c358700b00393e80c59daso1209750wmq.0
 for <55016 <at> debbugs.gnu.org>; Tue, 26 Apr 2022 05:29:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=+f93WSoB5KWc3yMEoOXvzDrOSzyRHCjCqZ5TWIhPLLY=;
 b=CsaVNPp5h/HcyEd3ZU3Ve8yFoxcKK1x097kjZGWDjVpg+/FZBK+va939O+204FwZbJ
 sSjDxCr8ONTDaKW+f9zCJL7bNCFORoVImeUPKIn3PB9eUY+3+0yYtTPnn+5Qp6rTn77E
 ZnGjwwQpku8kIaZPqnUmiQKJYH+K3ipaQZiKqHebeubaAZyqnAheQS+Z1w0dNEgVg+Cb
 x28cMDBSJXec0koCnHHfJMFJHUgo9yzbcl0kqYzDUYb/RcxvKv9xj49GX6Hhbc/Eyei0
 pfbdxCCBMZ46nxX8K8Q36Vaz1MTHv0VOh3pa74QKoCK65hKEJgWwzucF8MctsVLm+sbQ
 08iQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=+f93WSoB5KWc3yMEoOXvzDrOSzyRHCjCqZ5TWIhPLLY=;
 b=KgJOZfLFjPFJCIsQaZjtbe6OaO8HUzHKi8nucNAfrB9j0jnnX85Wz0Igv3xbMFr0J8
 3UVjYx124GoR2QaQW4hB2c7Si5Ver3Zfte0VQQKdgTK37ZhgsuHhW923U6eiJVz6z/sz
 xuCVTy3BMzQ1ElPjnN6B0vuH0XMqjU8vgwc9RfkiczuVbBjRlqCKPB71XmAZBDly6gET
 2QBWATt/UMzjwWyY1lo/mVnJSjZLNrMPbr5lLT/YmEBKhWhObLl+M8hEGDCNvZOqHg6U
 Ee2nT64KQFgoN5RrriATF/sVLd0eYF7J1eTFA25nYLC7QdZssguYmpiLoyW6slOmWmCm
 mfJQ==
X-Gm-Message-State: AOAM530syeyWoNW7kCm1U1t9GfWFOwoxo9noxyru4TiNwLdBNyGgEF6S
 elD9G+cLPFg0Siy2JR1nuIM=
X-Google-Smtp-Source: ABdhPJyhh5AP6qmGnl0EK+ZuYp4M1rO2pV7RTbF7EZv6lYgivJk9UYXZ1wqxTEHUJlQtHfwjRrj/Dg==
X-Received: by 2002:a7b:c94a:0:b0:38e:c252:4a58 with SMTP id
 i10-20020a7bc94a000000b0038ec2524a58mr30883552wml.177.1650976140345; 
 Tue, 26 Apr 2022 05:29:00 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 a7-20020adffb87000000b00207982c7f4dsm11581831wrr.67.2022.04.26.05.28.58
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 26 Apr 2022 05:28:59 -0700 (PDT)
Message-ID: <298c6f92-8d09-2254-82a4-403b56328fc0@HIDDEN>
Date: Tue, 26 Apr 2022 15:28:57 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN> <83v8uxmljj.fsf@HIDDEN>
 <5e6b8f45-0db1-1c4e-20a0-939c3d8f5b69@HIDDEN> <834k2gm4v2.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <834k2gm4v2.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 26.04.2022 15:00, Eli Zaretskii wrote:
> If we just show those file names in some window, they don't need to be
> re-quoted, I think.  Quoting is only needed if the resulting file
> names will be passed to Lisp APIs to act on them.

They are not just shown. The file names are used when the user tries to 
visit the reference (e.g. with RET).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 12:00:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 08:00:56 2022
Received: from localhost ([127.0.0.1]:37337 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njJsG-0001g3-0X
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:00:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1njJsE-0001fo-Fz
 for 55016 <at> debbugs.gnu.org; Tue, 26 Apr 2022 08:00:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58416)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1njJs8-0006WJ-Tp; Tue, 26 Apr 2022 08:00:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=AxuVzGO3XeNC36xBZQfKiCAhsUxN0TWItfA8So2zx7E=; b=VAa+HIOpyYGj
 su9qr2GEXPCbnJDppo0MmV2W2KNRhL+Ycr9nlhYL5CnczO+Ag6/Ruci/9G5ZiBYJfz4GM/Ggb3utL
 HR3wrElcy5nKi+jl8pEKVGIJmcyBo9/1aVa6+uggWJF2x4n1noRS5NCGEgbXC0sQg/EbR/sE3/+mC
 5bVrlqFwuwEaSQU0hNSeTSeX1WpORNOz7H0t7nNoCDh4PaQdnA7kRv1bwMQzFVpldmbCdURkQUkTS
 DI7R+A++8hkBmxnsGS7V7DJU6k+9UlVT4QwERJuQRxrzMpnn0pDROljRhe/alyarrTUkDXgUXe/RU
 vf97YvVQT6+47aylZHTwmw==;
Received: from [87.69.77.57] (port=2966 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1njJs5-00013y-RY; Tue, 26 Apr 2022 08:00:48 -0400
Date: Tue, 26 Apr 2022 15:00:33 +0300
Message-Id: <834k2gm4v2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <5e6b8f45-0db1-1c4e-20a0-939c3d8f5b69@HIDDEN> (message from
 Dmitry Gutov on Tue, 26 Apr 2022 05:05:18 +0300)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN> <83v8uxmljj.fsf@HIDDEN>
 <5e6b8f45-0db1-1c4e-20a0-939c3d8f5b69@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 26 Apr 2022 05:05:18 +0300
> Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
> From: Dmitry Gutov <dgutov@HIDDEN>
> 
> On 25.04.2022 14:48, Eli Zaretskii wrote:
> > Ah, okay.  But, after the changes you posted, which file names may
> > need unquoting, and why?  The whole point of the changes is not to use
> > any file names literally in the command line passed to the shell.  And
> > our low-level primitives that invoke the shell already know to unquote
> > file names, so this should "just work", no?
> 
> All right, seems so. The difference with local-dir in 
> xref-matches-in-directory, is that in that function the value did get 
> inserted into a shell command string.
> 
> At least it did before 71f8b55f46a. Now that it doesn't, I suppose it 
> doesn't need to unquote either. But then again, the previous version of 
> the code didn't do any "requoting" of the file names returned in the 
> Find+Grep output (if they are supposed to be requoted, that is).
> 
> Nor does xref-matches-in-files do any "requoting". And this function is 
> frequently-used, so any problems with that approach should have already 
> come up.

If we just show those file names in some window, they don't need to be
re-quoted, I think.  Quoting is only needed if the resulting file
names will be passed to Lisp APIs to act on them.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 11:18:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 07:18:43 2022
Received: from localhost ([127.0.0.1]:37223 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njJDL-0004U7-RP
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 07:18:43 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1njJDK-0004Ta-2d
 for 55016 <at> debbugs.gnu.org; Tue, 26 Apr 2022 07:18:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58036)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1njJDE-0007U5-QR; Tue, 26 Apr 2022 07:18:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=zbeDUB4TCk8UCcStNbE56OfDviYpkboc29TQ2WJ8w8I=; b=HUcVi6SEJovG
 HhudC2JEG9nXCJ8gxaXua69riahn1g4CGNzHuvZgmprW+FbfqWL3P9aZWxf1j96H5uCdkdQNFwFxn
 k5kuLifE7VqbkoAC2Z5PZgWoyfBQesTAnqiOpjAfqi2zmhjAuSqyJgIxDGyz4JZViHn+oWQu7wiUv
 rm5XNFXx1cnnep8iyP8M48OjOI5Nxzvk27VGY5n1dGwOaZ4HsW6pSYNadGHJAx6xJV1amuM6BuSB1
 B7zs3rhOerPoIaR3qnrqGQQa95XD+Hcg/YXHkQosXA2/whvqUvt5hUUph9RsOY0E31T0fpjaPSnr2
 8jg79GEHaobU8oJt96JFlA==;
Received: from [87.69.77.57] (port=4083 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1njJDE-0007Eq-8m; Tue, 26 Apr 2022 07:18:32 -0400
Date: Tue, 26 Apr 2022 14:18:20 +0300
Message-Id: <838rrsm6tf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter Povinec <spepo.42@HIDDEN>
In-Reply-To: <CAJDw7Kvzwyg9BefivM2wmh+TEBWLFE=uJDHhaksq-4DL8ppVBA@HIDDEN>
 (message from Peter Povinec on Mon, 25 Apr 2022 21:57:59 -0700)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN>
 <83ilqznj23.fsf@HIDDEN>
 <CAJDw7KseZso8PN_L3bf4vW-Dc8WbpMVfT7xQmXYa7Uy432xOJA@HIDDEN>
 <46536fae-4122-6994-99d0-d5f79af22aba@HIDDEN>
 <CAJDw7Kvzwyg9BefivM2wmh+TEBWLFE=uJDHhaksq-4DL8ppVBA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Povinec <spepo.42@HIDDEN>
> Date: Mon, 25 Apr 2022 21:57:59 -0700
> Cc: Eli Zaretskii <eliz@HIDDEN>, 55016 <at> debbugs.gnu.org
> 
> On Mon, Apr 25, 2022 at 7:07 PM Dmitry Gutov <dgutov@HIDDEN> wrote:
> >
> > Anyway, here's the patch in attachment which should be much easier to
> > apply either way. It also contains a tiny renaming.
> 
> Indeed. It applied successfully, thanks for that.
> 
> I can confirm that the patch fixes the bug. However, I noticed a subtle
> change in behavior: With the patch, the xref buffer shows the file names
> with '~' in them, whereas before the patch, the '~' was resolved to
> '/Users/username'. Functionally, it doesn't seem to make a difference
> though -- at least as far as I can tell.

Thanks for testing.

We could use abbreviate-file-name, perhaps.  But I'm not sure the
change you describe is not for the better, since absolute file names
are absolutely understandable and interpreted correctly in all
situations, whereas file names that begin with "~/" need to be
interpreted either by Emacs or by a reasonably functional shell before
they can be safely passed to any other program.

I'm curious what does Dmitry think about this consequence of the
change.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 04:58:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 00:58:17 2022
Received: from localhost ([127.0.0.1]:36610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njDHF-0003cm-Fy
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 00:58:17 -0400
Received: from mail-vs1-f46.google.com ([209.85.217.46]:37564)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spepo42@HIDDEN>) id 1njDHD-0003cZ-IW
 for 55016 <at> debbugs.gnu.org; Tue, 26 Apr 2022 00:58:16 -0400
Received: by mail-vs1-f46.google.com with SMTP id t85so6721626vst.4
 for <55016 <at> debbugs.gnu.org>; Mon, 25 Apr 2022 21:58:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=OmLpfh+xtdu/qv/3hhcjARuIIBqJjvDK0bet1MCeoBc=;
 b=B/S4H2pXnmNkLKXdDdw8gfBQkS6x6g2flNX7RW6M4g/jq5ttyYaoCkA1uYys73JNjG
 JlFRzn255fkAbeXO7dxVft0Vsqs3aAUgd3sK7j/meA5LfkOirsZ2/AReQn8wpUGEy0sS
 luiwqDWTZ4VTzca1DXghXDch0nuXNrTRCd1UVQJCZ3TfRaKkLnN4ndgzHeTfun267xJb
 S7C3+u8eUM6pzHm/CzugNj7T68D/cMunMD+0yZpo5+MPBVNllV89cS+v4vaBd7dpKdIz
 iOryV5jS2KXePUY+4nYmSTnd4pK/krr/JTbj1d9/bqkDD+ss06YKZXFp6dg4BI7O7P+A
 JfuQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=OmLpfh+xtdu/qv/3hhcjARuIIBqJjvDK0bet1MCeoBc=;
 b=LmZVxwYuzvWITdpo2N1tVfsQKE0jsFCmYkijkVtELIgWCHHkxCtRopeklQjizqb8Lq
 mZ3x1oljKwlskh8ipCfovcofuOaenIsSaqb1SI35mjf0/onsZZNZ3r/CV8nAGIehNJvM
 ark1pB/c1/anVtSyKx8cA+w/dW/Ov6VTotkf5Ph6G/exl25T77O50roTSoITweeV/N7X
 R61THhVPfUGn5r4RooDClz1FMX2yu20wN7c4o5YaBXtjk8q/Bb4PB9zUnDRotSNfK/wi
 SX61uZZLzx1RK+OaYzSo1PP5LBO+XcaiR8DvHu2jleqz2bFYVsOjS0UxmdorZUtvY7i0
 M4Eg==
X-Gm-Message-State: AOAM5304ZJciWDbOGuBkwO4YGkhWQts0Jlg3QuT8oo1iMY+k08KOQ5JJ
 SmDOffy4hlKoRQCH46w0z+rFwFT6mj0Mjzvf4vs=
X-Google-Smtp-Source: ABdhPJyaQGiUIpcaSLu2a3RKru5WJkPASxgXpVIsuhOeVLde0upp0qaBO5gyPRwLO98T+8EfjQnlPezpM+2TMikBGNI=
X-Received: by 2002:a67:ea51:0:b0:320:c3a9:414b with SMTP id
 r17-20020a67ea51000000b00320c3a9414bmr6285068vso.81.1650949089936; Mon, 25
 Apr 2022 21:58:09 -0700 (PDT)
MIME-Version: 1.0
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN>
 <83ilqznj23.fsf@HIDDEN>
 <CAJDw7KseZso8PN_L3bf4vW-Dc8WbpMVfT7xQmXYa7Uy432xOJA@HIDDEN>
 <46536fae-4122-6994-99d0-d5f79af22aba@HIDDEN>
In-Reply-To: <46536fae-4122-6994-99d0-d5f79af22aba@HIDDEN>
From: Peter Povinec <spepo.42@HIDDEN>
Date: Mon, 25 Apr 2022 21:57:59 -0700
Message-ID: <CAJDw7Kvzwyg9BefivM2wmh+TEBWLFE=uJDHhaksq-4DL8ppVBA@HIDDEN>
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
To: Dmitry Gutov <dgutov@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On Mon, Apr 25, 2022 at 7:07 PM Dmitry Gutov <dgutov@HIDDEN> wrote:
>
> Anyway, here's the patch in attachment which should be much easier to
> apply either way. It also contains a tiny renaming.

Indeed. It applied successfully, thanks for that.

I can confirm that the patch fixes the bug. However, I noticed a subtle
change in behavior: With the patch, the xref buffer shows the file names
with '~' in them, whereas before the patch, the '~' was resolved to
'/Users/username'. Functionally, it doesn't seem to make a difference
though -- at least as far as I can tell.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 02:07:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 25 22:07:54 2022
Received: from localhost ([127.0.0.1]:36518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njAcL-0007lS-Pm
	for submit <at> debbugs.gnu.org; Mon, 25 Apr 2022 22:07:54 -0400
Received: from mail-wm1-f50.google.com ([209.85.128.50]:34278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1njAcJ-0007lE-Du
 for 55016 <at> debbugs.gnu.org; Mon, 25 Apr 2022 22:07:51 -0400
Received: by mail-wm1-f50.google.com with SMTP id
 ay36-20020a05600c1e2400b0038ebc885115so429957wmb.1
 for <55016 <at> debbugs.gnu.org>; Mon, 25 Apr 2022 19:07:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:cc:references:from:in-reply-to;
 bh=zv18jHDCobuoAE91HTljsU0gYLVJgEnM3I7fNO91UwU=;
 b=IGx7dIpmVEX9ocZP0Jiu9TalIoppZtRDlO8q3jjry1hUVc6VbBo2LxQi4R+QuZlHXq
 VR3y5XpnTGFiFec4Q56FwHV2NBd45aGC0SuP6MDM2NLt+hcKJcflctA2xmKAoogFjsL0
 W6apVHCLn3NfaVDG0Be8GmfyAcAhvVSPIqTWqSWbxqfHZbaaeuc8X/uj567KBdqqO7hb
 EY6f1XcsK02E1out/YNBIMh67gwoZaNE8aaojVQjkHXdFLpVtQuaxIoJOcgnqJU4CxAK
 36X4aIEcM+EubvB93dUEiLpLY7JZI9JSGPdQiBWOrwYkV24rHzk0u39COtPT4+3YOCJZ
 xX3w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:cc:references:from:in-reply-to;
 bh=zv18jHDCobuoAE91HTljsU0gYLVJgEnM3I7fNO91UwU=;
 b=XT0La50xecikHROCc2SjOVtUNrwrSwSacHJZW/YafZRZvg7Z932zJkgd4rxX0o/qNp
 fDjY6clYojxmgQ3Iq0X2TivOHXR6l8Fc0v2ote/YxF8+USovfty1RLScDtx4XA+HR0ff
 UGjM5Y9+1RY+3LjTD0jhuX75SVTR3OskCgCX5H7371JfdYB8Qyv/H8q20tvqK2QRu8FA
 hlPd/X2tKkLAkK8+n138eeO0LTf4/NOY90/emWZRH/+ZuixpHfvffxQ71yKNBU8kND0j
 8yManzSPvCX9xAvqo/WzesuuUHGgg6IP2vvXjOm+Q5i01aHsLStz40/mEZ9YnYAgY4oC
 hgiA==
X-Gm-Message-State: AOAM533Qj72Y9Yd84zdnoIiVtPNkTyAPkZA09UPshTDudwZp59unVeD7
 hHTd6v6xOXA2c+eHo7zebNE=
X-Google-Smtp-Source: ABdhPJxz2lCUQJ/uyNWgdyR0V2NzSQ9IVxwkfCQcHhI83uO1UEDgYsxCoQbfJfz1Mzd+sVC+c6li2A==
X-Received: by 2002:a05:600c:3ac8:b0:392:a821:7975 with SMTP id
 d8-20020a05600c3ac800b00392a8217975mr27964577wms.138.1650938865647; 
 Mon, 25 Apr 2022 19:07:45 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 l21-20020a05600c4f1500b00393eb0d01f7sm4868799wmq.23.2022.04.25.19.07.44
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 25 Apr 2022 19:07:45 -0700 (PDT)
Content-Type: multipart/mixed; boundary="------------UGJ0PYnvi2qLZY6D3wIW6Ugu"
Message-ID: <46536fae-4122-6994-99d0-d5f79af22aba@HIDDEN>
Date: Tue, 26 Apr 2022 05:07:43 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
Content-Language: en-US
To: Peter Povinec <spepo.42@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <CAJDw7KseZso8PN_L3bf4vW-Dc8WbpMVfT7xQmXYa7Uy432xOJA@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <CAJDw7KseZso8PN_L3bf4vW-Dc8WbpMVfT7xQmXYa7Uy432xOJA@HIDDEN>
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

This is a multi-part message in MIME format.
--------------UGJ0PYnvi2qLZY6D3wIW6Ugu
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 26.04.2022 04:05, Peter Povinec wrote:
> Is it just me, or does it fail for you too?
> What is the best way to apply such a patch to my local sources?

I haven't tried, but 'C-c C-a' in diff-mode usually helps with this kind 
of issues. So you save the patch from the email into a file with 
extension .diff, visit in in Emacs, and then press the above key sequence.

Anyway, here's the patch in attachment which should be much easier to 
apply either way. It also contains a tiny renaming.
--------------UGJ0PYnvi2qLZY6D3wIW6Ugu
Content-Type: text/x-patch; charset=UTF-8;
 name="semantic-symref-grep--local-dir.diff"
Content-Disposition: attachment;
 filename="semantic-symref-grep--local-dir.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2xpc3AvY2VkZXQvc2VtYW50aWMvc3ltcmVmL2dyZXAuZWwgYi9saXNw
L2NlZGV0L3NlbWFudGljL3N5bXJlZi9ncmVwLmVsCmluZGV4IDI3ZWE4MGZjMzIuLjA3Njc3
NWJmZWMgMTAwNjQ0Ci0tLSBhL2xpc3AvY2VkZXQvc2VtYW50aWMvc3ltcmVmL2dyZXAuZWwK
KysrIGIvbGlzcC9jZWRldC9zZW1hbnRpYy9zeW1yZWYvZ3JlcC5lbApAQCAtMTM5LDYgKzEz
OSw4IEBAIHNlbWFudGljLXN5bXJlZi1ncmVwLS1xdW90ZS1ncmVwCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgKGxhbWJkYSAocykgKGNvbmNhdCAiXFwiIHMpKQogICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIHN0cmluZyBuaWwgdCkpCiAKKyhkZWZ2YXIgc2VtYW50aWMt
c3ltcmVmLWdyZXAtLWxvY2FsLWRpciBuaWwpCisKIChjbC1kZWZtZXRob2Qgc2VtYW50aWMt
c3ltcmVmLXBlcmZvcm0tc2VhcmNoICgodG9vbCBzZW1hbnRpYy1zeW1yZWYtdG9vbC1ncmVw
KSkKICAgIlBlcmZvcm0gYSBzZWFyY2ggd2l0aCBHcmVwLiIKICAgOzsgR3JlcCBkb2Vzbid0
IHN1cHBvcnQgc29tZSB0eXBlcyBvZiBzZWFyY2hlcy4KQEAgLTE3MCwxMSArMTcyLDEyIEBA
IHNlbWFudGljLXN5bXJlZi1wZXJmb3JtLXNlYXJjaAogICAgICAgKGVyYXNlLWJ1ZmZlcikK
ICAgICAgIChzZXRxIGRlZmF1bHQtZGlyZWN0b3J5IHJvb3RkaXIpCiAgICAgICAobGV0ICgo
Y21kIChzZW1hbnRpYy1zeW1yZWYtZ3JlcC11c2UtdGVtcGxhdGUKLSAgICAgICAgICAgICAg
ICAgIChkaXJlY3RvcnktZmlsZS1uYW1lIChmaWxlLWxvY2FsLW5hbWUgcm9vdGRpcikpCisg
ICAgICAgICAgICAgICAgICAiLiIKICAgICAgICAgICAgICAgICAgIGZpbGVwYXR0ZXJuIGdy
ZXBmbGFncyBncmVwcGF0KSkpCiAgICAgICAgIChwcm9jZXNzLWZpbGUgc2VtYW50aWMtc3lt
cmVmLWdyZXAtc2hlbGwgbmlsIGIgbmlsCiAgICAgICAgICAgICAgICAgICAgICAgc2hlbGwt
Y29tbWFuZC1zd2l0Y2ggY21kKSkpCi0gICAgKHNldHEgYW5zIChzZW1hbnRpYy1zeW1yZWYt
cGFyc2UtdG9vbC1vdXRwdXQgdG9vbCBiKSkKKyAgICAobGV0ICgoc2VtYW50aWMtc3ltcmVm
LWdyZXAtLWxvY2FsLWRpciAoZGlyZWN0b3J5LWZpbGUtbmFtZSAoZmlsZS1sb2NhbC1uYW1l
IHJvb3RkaXIpKSkpCisgICAgICAoc2V0cSBhbnMgKHNlbWFudGljLXN5bXJlZi1wYXJzZS10
b29sLW91dHB1dCB0b29sIGIpKSkKICAgICA7OyBSZXR1cm4gdGhlIGFuc3dlcgogICAgIGFu
cykpCiAKQEAgLTE5MCwxMiArMTkzLDEyIEBAIHNlbWFudGljLXN5bXJlZi1wYXJzZS10b29s
LW91dHB1dC1vbmUtbGluZQogICAgICAgICAgICgoZXEgKG9yZWYgdG9vbCByZXN1bHR0eXBl
KSAnbGluZS1hbmQtdGV4dCkKICAgICAgICAgICAgKHdoZW4gKHJlLXNlYXJjaC1mb3J3YXJk
IGdyZXAtcmUgbmlsIHQpCiAgICAgICAgICAgICAgKGxpc3QgKHN0cmluZy10by1udW1iZXIg
KG1hdGNoLXN0cmluZyBsaW5lLWdyb3VwKSkKLSAgICAgICAgICAgICAgICAgICAobWF0Y2gt
c3RyaW5nIGZpbGUtZ3JvdXApCisgICAgICAgICAgICAgICAgICAgKGNvbmNhdCBzZW1hbnRp
Yy1zeW1yZWYtZ3JlcC0tbG9jYWwtZGlyIChzdWJzdHJpbmcgKG1hdGNoLXN0cmluZyBmaWxl
LWdyb3VwKSAxKSkKICAgICAgICAgICAgICAgICAgICAoYnVmZmVyLXN1YnN0cmluZy1uby1w
cm9wZXJ0aWVzIChwb2ludCkgKGxpbmUtZW5kLXBvc2l0aW9uKSkpKSkKIAkgICh0CiAJICAg
KHdoZW4gKHJlLXNlYXJjaC1mb3J3YXJkIGdyZXAtcmUgbmlsIHQpCiAJICAgICAoY29ucyAo
c3RyaW5nLXRvLW51bWJlciAobWF0Y2gtc3RyaW5nIGxpbmUtZ3JvdXApKQotCQkgICAobWF0
Y2gtc3RyaW5nIGZpbGUtZ3JvdXApKQorCQkgICAoY29uY2F0IHNlbWFudGljLXN5bXJlZi1n
cmVwLS1sb2NhbC1kaXIgKHN1YnN0cmluZyAobWF0Y2gtc3RyaW5nIGZpbGUtZ3JvdXApIDEp
KSkKIAkgICAgICkpKSkpCiAKIChwcm92aWRlICdzZW1hbnRpYy9zeW1yZWYvZ3JlcCkK

--------------UGJ0PYnvi2qLZY6D3wIW6Ugu--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 02:05:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 25 22:05:27 2022
Received: from localhost ([127.0.0.1]:36508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njAZz-0007hf-LB
	for submit <at> debbugs.gnu.org; Mon, 25 Apr 2022 22:05:27 -0400
Received: from mail-wr1-f51.google.com ([209.85.221.51]:42702)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1njAZy-0007hS-Ky
 for 55016 <at> debbugs.gnu.org; Mon, 25 Apr 2022 22:05:26 -0400
Received: by mail-wr1-f51.google.com with SMTP id e24so3472556wrc.9
 for <55016 <at> debbugs.gnu.org>; Mon, 25 Apr 2022 19:05:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=/u8JDoXn48RuF+vVM7hIr2nk/z06RmdrmJ461yQUOgs=;
 b=h+aNvYVp1lU7ImrJ7JbWoqxAk1ZnccwokN9ZAn8z9t648lqdYzv1pgvqCE/eubwfSW
 Z4OL7dHE/tYrbHqQAH+F5kHiqXX0agwN3sqDpF7DLvX89CiwlFIYlzMpqr95JI6mvPlY
 pL3Bfzt0dVyUqNqoGrYdfya1RO843dAD4IP+0lQYO5LFUOCRmKfSlrA+L03FME/ZP3Dm
 gGtlWVXCSzd7NAE/GEUonKw3eWZUAi2MCElqGa+N51cWUZZVtiBvOJzWkuzVv+MM7+lr
 0Aqz620GjYzwWCfB1sxoLTCUY0cnSDvJW9gSE+f91Q7ZBOx7Qdf/9hOUPadPAyFqZrPv
 5Wmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=/u8JDoXn48RuF+vVM7hIr2nk/z06RmdrmJ461yQUOgs=;
 b=Xo/QZAiy/sDnBsQOGqbMSGflHPNYKCLT4NbObqG4f5JueonxeKKwjWxY8U59NcH9h2
 uO9bRpO1JOfrGN1P55Dt8N7vzJgVCM0QLf/lLyzZCm4qTJ2IMsBngh8tffdNh1JoJose
 DTFVm043mTwQQurSOPqoehVxaw4Aa59y32BWOkAefhvAZyc1eTNFEwYW9Xhv4dTptmNg
 rcJoMi8xDQhgabZzkdwcSaupoBZUENO5/AU9uEUVjsgx7vzKKJtcxUWzA8jFIOOXkjBs
 b20MYkVMhyMuKtel1nRUPlHumOKOQFvJ4/bFL7ZRZ1AE/vNFO4kD1s58Z5wq7LVd8QlR
 xSJA==
X-Gm-Message-State: AOAM5337OwWOwqoIph0uB86DgVXGPu6zN/TkEesyB1N/4zUY+8AiyMFJ
 O3RN8FU0xn4IWe8ouOlyo3Y=
X-Google-Smtp-Source: ABdhPJzegTVfHrtXpPpeil1RENcL7Yr59m94Bc26X0kPVGF3qiFRfCcv/4bn4yy4sNy/LmUhSxoGKg==
X-Received: by 2002:a5d:4581:0:b0:20a:d58f:3307 with SMTP id
 p1-20020a5d4581000000b0020ad58f3307mr10173934wrq.702.1650938720809; 
 Mon, 25 Apr 2022 19:05:20 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 d29-20020adf9b9d000000b0020ada099ed5sm4521592wrc.17.2022.04.25.19.05.19
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 25 Apr 2022 19:05:20 -0700 (PDT)
Message-ID: <5e6b8f45-0db1-1c4e-20a0-939c3d8f5b69@HIDDEN>
Date: Tue, 26 Apr 2022 05:05:18 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN> <83v8uxmljj.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <83v8uxmljj.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 25.04.2022 14:48, Eli Zaretskii wrote:
> Ah, okay.  But, after the changes you posted, which file names may
> need unquoting, and why?  The whole point of the changes is not to use
> any file names literally in the command line passed to the shell.  And
> our low-level primitives that invoke the shell already know to unquote
> file names, so this should "just work", no?

All right, seems so. The difference with local-dir in 
xref-matches-in-directory, is that in that function the value did get 
inserted into a shell command string.

At least it did before 71f8b55f46a. Now that it doesn't, I suppose it 
doesn't need to unquote either. But then again, the previous version of 
the code didn't do any "requoting" of the file names returned in the 
Find+Grep output (if they are supposed to be requoted, that is).

Nor does xref-matches-in-files do any "requoting". And this function is 
frequently-used, so any problems with that approach should have already 
come up.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 26 Apr 2022 01:06:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 25 21:06:00 2022
Received: from localhost ([127.0.0.1]:36428 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nj9eR-00068e-Sw
	for submit <at> debbugs.gnu.org; Mon, 25 Apr 2022 21:06:00 -0400
Received: from mail-vs1-f45.google.com ([209.85.217.45]:33316)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spepo42@HIDDEN>) id 1nj9eP-00068K-PI
 for 55016 <at> debbugs.gnu.org; Mon, 25 Apr 2022 21:05:58 -0400
Received: by mail-vs1-f45.google.com with SMTP id v139so6611420vsv.0
 for <55016 <at> debbugs.gnu.org>; Mon, 25 Apr 2022 18:05:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=4Anvl3U0AzMVuOYD2OPOrnB9c6b9h+Ko7tDuUKWIMB8=;
 b=FZf1RkLmgC7nDsdtJBv+RRwE1RXJg+eqIlhbIuwb8wrwDChHSq5yxRgPJaApWtWWsu
 5oWv6ObSykU61osk1gNybZj2hftQiLXbix7Xn79mtayn4jl5CMwTU6L4vSNchRBDH0Xp
 DVUOHGN3KF3xNxVrsQoh2ZC5Yroad4RWkrwJlPs0B5O1XzmfbtSLZheuqhYyRaVRA7cQ
 AP3JqTak6a0IrX7Xs4xj9/izf1aPIaatQcTznYE0GLknmISKtdz8v0DCA5iRYAUkxk6M
 VO3lLKPsWi3m92IpZlcLwx9dJM7UhEdowcoCf7lh+fNzrqKGQz447LpNMGA+tMirxvHT
 xZ3w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=4Anvl3U0AzMVuOYD2OPOrnB9c6b9h+Ko7tDuUKWIMB8=;
 b=LfaBT0G3ZraeG8L9bTNMeCJXLKgKAhglh4Z8mVgc/nqBRxqjErNTJPnUZv44y9SK9r
 CIuQkCHymcXu3G4mHNLwrf4cPp5s1yhHpdyMfVyK2jxDqaDeKe6uhqxasHxyiovs4WZe
 d4DDbc4KIj30MQ05mCdmgGqNeHDxxYW9D+23z74NVtXBD98/NOtx52prH6/n2xoPtyPA
 Z5yThIJER+RNd8ukvZ4bwjfkjSExodNraLrFkJF3Xe4mawtdygJ1atoBa8iQO+HYnaVl
 mvNUk0AvntNTexTfeu56zY6r4rSlYWCOgNqOSKZoQLQa42Heucr9o21FdEzfJBtcpYR7
 hbuQ==
X-Gm-Message-State: AOAM532Wf53PnkhEwMxI8ehi6hjP3FyPKBH4eTXmxWeDuG9+MG0T1Tul
 PAQHz79mu7cwEycKqCnS60DBvbK/0xWb4u2sSaU=
X-Google-Smtp-Source: ABdhPJxanGcBms8dBrDZUHhZhETWav69+dpGVtybE9nHxQlw+2mtzab+W4GYrMnw55UBqVAcnTx3xI1BMyApU8euS6E=
X-Received: by 2002:a67:f9c3:0:b0:32c:e32d:c7ab with SMTP id
 c3-20020a67f9c3000000b0032ce32dc7abmr485022vsq.52.1650935152301; Mon, 25 Apr
 2022 18:05:52 -0700 (PDT)
MIME-Version: 1.0
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN>
 <83ilqznj23.fsf@HIDDEN>
In-Reply-To: <83ilqznj23.fsf@HIDDEN>
From: Peter Povinec <spepo.42@HIDDEN>
Date: Mon, 25 Apr 2022 18:05:41 -0700
Message-ID: <CAJDw7KseZso8PN_L3bf4vW-Dc8WbpMVfT7xQmXYa7Uy432xOJA@HIDDEN>
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On Sat, Apr 23, 2022 at 10:32 PM Eli Zaretskii <eliz@HIDDEN> wrote:
>
> Thanks.  Peter, can you try the patch proposed by Dmitry and see if it
> works in your case?

I am having a hard time applying that patch. First, it has long lines that
have been wrapped at 80.  Second, even after manually fixing those I get
this error from git apply:
error: patch fragment without header at line 29: @@ -190,10 +193,10 @@
semantic-symref-parse-tool-output-one-line

Is it just me, or does it fail for you too?
What is the best way to apply such a patch to my local sources?

Thanks,
Peter




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 25 Apr 2022 11:48:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 25 07:48:23 2022
Received: from localhost ([127.0.0.1]:33436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nixCZ-0006EO-1c
	for submit <at> debbugs.gnu.org; Mon, 25 Apr 2022 07:48:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60090)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nixCX-0006EC-7s
 for 55016 <at> debbugs.gnu.org; Mon, 25 Apr 2022 07:48:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35446)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nixCR-0001kM-Up; Mon, 25 Apr 2022 07:48:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Ng8JFXn5uH0jrqUcJbO+3nGAWQi22c9uXKFQVBPIcuU=; b=NS57AYLxJZcW
 IJTsHGwCOQAZ8O2FcYUj3Hcp+zrDcgTpjHppd0PAO6ZLHIR7wLaF5zgD5geyfXvJYn+A/g64SXMa2
 xKe4o0jVqwxNRqV2m5O8w/JS+sInPXcrJjdAK4RdurVzWuPS5D5w3V8t5FuYPonvOV7Ovvt0rn1iJ
 oQ/vnFywVsttSPrbN8+ExfemGhBelFZqMLGuC1IvUytzWrvZeAIAS6wAWPNVh7GEQxEuJLh/l6Edg
 m3qPDf8stppsURAiVFKZa6gqzRYhxk+rn66rjzDWy5XT0SiHx3mvTd8rUUeaAf6R8F75/nBgCsYUC
 rvhD7xY6UQs5SNq4yyFM/A==;
Received: from [87.69.77.57] (port=3183 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nixCR-0000uM-DG; Mon, 25 Apr 2022 07:48:15 -0400
Date: Mon, 25 Apr 2022 14:48:00 +0300
Message-Id: <83v8uxmljj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN> (message from
 Dmitry Gutov on Mon, 25 Apr 2022 05:08:56 +0300)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
 <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, p.stephani2@HIDDEN, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 25 Apr 2022 05:08:56 +0300
> Cc: 55016 <at> debbugs.gnu.org, spepo.42@HIDDEN,
>  Philipp Stephani <p.stephani2@HIDDEN>
> From: Dmitry Gutov <dgutov@HIDDEN>
> 
> On 24.04.2022 08:31, Eli Zaretskii wrote:
> >> (Should this also use 'file-name-unquote'?)
> > I'm not sure I follow: where would we use that and for what purpose?
> 
> xref-matches-in-directory uses it since the discussion in bug#47799.
> 
> To... obtain a local directory name which would be understood by the 
> shell, I guess?

Ah, okay.  But, after the changes you posted, which file names may
need unquoting, and why?  The whole point of the changes is not to use
any file names literally in the command line passed to the shell.  And
our low-level primitives that invoke the shell already know to unquote
file names, so this should "just work", no?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 25 Apr 2022 02:09:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 24 22:09:06 2022
Received: from localhost ([127.0.0.1]:60458 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nio9y-0004tS-Gw
	for submit <at> debbugs.gnu.org; Sun, 24 Apr 2022 22:09:06 -0400
Received: from mail-wr1-f47.google.com ([209.85.221.47]:35581)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1nio9x-0004sy-03
 for 55016 <at> debbugs.gnu.org; Sun, 24 Apr 2022 22:09:05 -0400
Received: by mail-wr1-f47.google.com with SMTP id j15so5552473wrb.2
 for <55016 <at> debbugs.gnu.org>; Sun, 24 Apr 2022 19:09:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=SHXjzyan6grH5Y8CQhrhq+08n1p6OKf4Yzja9rWmmHw=;
 b=miwKDvbDu/MFC9IRXuFEmPN6TCKSZFftSuf/19SxmJVoxmxJtmqKpoxU6Hir9SnjhQ
 qCTSzu2zcWN2pNO/63LhpbQ3mNjZptGffTByt/9s1+0GOVUDN4JBucQbdHsnCt2drSXX
 YgzxcfgOjwflaI0AiOAWPzMb2UPLhJe3Ingt+I6f94BFSITnxkqmCqMrrTYjJYe7pwVm
 X/IwXk/QbSKvm5D3viSbXgvvCg3erUf8lTLYYYoDtqS5kG1HQisobs7MCdOytEuzC8L9
 FP4iyHuscrUmt9livoCcLjJWOcDqbzHYcEGsElL6e2PL3FYjkG3DFwxdnxsybboE9rlL
 xWwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=SHXjzyan6grH5Y8CQhrhq+08n1p6OKf4Yzja9rWmmHw=;
 b=6dqlub6ko8GhS2oFbjQDiNZhgTwM803+Bf7z8m2+qjZoA21dIbIadpTXXZD1pLeuNu
 whut9HNmkxzWvXGlNpz04K6kFHtSWuSAksMySW+wwoVVYIkFnfA8MTAcH3tenA79FfYD
 l0SRKzi2M94IgS8IIYbae+gjxDVtFUBZydcWx5eTeG+xTab+ULvijCMx1+UqbG35yk4f
 vuVqQfO62BH+1J5dBsomblrUoUzT5CXWkPYw5W99WS1Zf9LUjXoYMk2Xl3F8bEk9Ww+H
 Kk7mQfPDAcCd7gs636hNzeSOnO4j9vJ1qsL5Z6QV+PUi66NKHIPvdubERrRmTqZn0Ujh
 sAWw==
X-Gm-Message-State: AOAM531bJjd9TBG+H4aizVIpq3ltpSwsXcy9pWJTMjToWQrDnx1ya7AM
 PN91Rv9N+VZVZuD8Z5Ah1z0=
X-Google-Smtp-Source: ABdhPJwmDJQM25F+9IP4cxm3s94UAvG7xL3yu728auLkvQF+q8sgujNM8mjSWAkJlSbsWso3O8RuJQ==
X-Received: by 2002:a05:6000:18c1:b0:207:87dc:94b2 with SMTP id
 w1-20020a05600018c100b0020787dc94b2mr11851252wrq.437.1650852539208; 
 Sun, 24 Apr 2022 19:08:59 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 g13-20020a5d64ed000000b0020a9e488976sm8227584wri.25.2022.04.24.19.08.57
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 24 Apr 2022 19:08:58 -0700 (PDT)
Message-ID: <8c8f8c0a-f689-aa20-2220-e6a09ff3fa9b@HIDDEN>
Date: Mon, 25 Apr 2022 05:08:56 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> <83ilqznj23.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <83ilqznj23.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, Philipp Stephani <p.stephani2@HIDDEN>,
 spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.04.2022 08:31, Eli Zaretskii wrote:
>> (Should this also use 'file-name-unquote'?)
> I'm not sure I follow: where would we use that and for what purpose?

xref-matches-in-directory uses it since the discussion in bug#47799.

To... obtain a local directory name which would be understood by the 
shell, I guess?

It should make sense for symref/grep.el to also do it, but if it should, 
I'm surprised this kind of problem has never been reported. bug#47799 is 
not very new, after all.

Philipp? Does xref-find-references work fine for you inside directories 
that are supposed to be quoted? I'm not sure how this works, TBH, e.g. 
where the quoted file names usually come from.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 24 Apr 2022 05:32:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 24 01:32:16 2022
Received: from localhost ([127.0.0.1]:57521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1niUr1-00032j-Vp
	for submit <at> debbugs.gnu.org; Sun, 24 Apr 2022 01:32:16 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35016)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1niUr0-00032X-HA
 for 55016 <at> debbugs.gnu.org; Sun, 24 Apr 2022 01:32:14 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41946)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1niUqu-00050Q-Ig; Sun, 24 Apr 2022 01:32:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=3PunP6h37QUBXxiUZN0RKA5U3TTIrRFYqseIJ34pmfg=; b=DiKl9qBAm61J
 7b88POkH3OFoNzB2gUHjEpm3Gj+kbAjvOW4itmAIYePJ/oEkOuONTxYLBA3RKNlOnG+arUH1aHMyv
 sl12Ci6zqJc2avQ1GEb6MtHKZJ883vG3ASg0z18vCSIVuZ68542SN0cybOpG9xK/CsDHPKOPOJi1t
 0gDQw638A+KL9RYrWhu1HgFp7UYIeZZMdN0Xb6Gj8u3tdqUMTNDqCAzJPu1ubzfun9KpYHsQ+n/cW
 +G+4bmiQ6cCPFbS2J0vnVEeELzX8wdg3/++5YchgIu7Agzad+CVNouxn91mZrn5R1pogR8ZscsIIA
 557CrRFEAPMY/Wz2DL3N6A==;
Received: from [87.69.77.57] (port=4376 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1niUqs-0004Dc-KN; Sun, 24 Apr 2022 01:32:08 -0400
Date: Sun, 24 Apr 2022 08:31:48 +0300
Message-Id: <83ilqznj23.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN> (message from
 Dmitry Gutov on Sun, 24 Apr 2022 05:00:09 +0300)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
 <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 24 Apr 2022 05:00:09 +0300
> Cc: 55016 <at> debbugs.gnu.org, spepo.42@HIDDEN
> From: Dmitry Gutov <dgutov@HIDDEN>
> 
> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 24 Apr 2022 02:00:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 23 22:00:19 2022
Received: from localhost ([127.0.0.1]:57475 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1niRXv-0005sY-Cc
	for submit <at> debbugs.gnu.org; Sat, 23 Apr 2022 22:00:19 -0400
Received: from mail-wm1-f48.google.com ([209.85.128.48]:39556)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1niRXt-0005sF-R8
 for 55016 <at> debbugs.gnu.org; Sat, 23 Apr 2022 22:00:18 -0400
Received: by mail-wm1-f48.google.com with SMTP id
 ay11-20020a05600c1e0b00b0038eb92fa965so10380888wmb.4
 for <55016 <at> debbugs.gnu.org>; Sat, 23 Apr 2022 19:00:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=/NESL/+tPWPWySlHbBqnDjFcSjDmBJZ4kPsSVyXO4wo=;
 b=Vwd3kqOtWeWDSDFz0L5DJoWXOiZPEDh2CIIuGppuJv0OCcI3SYKe7EIPtoQj/9VD2z
 5Y4VU8qhqnXtI0TiL+rUn1I/zptbOyjnv8M8T2cHc9fJJwqI/gfIomCRiAkdH5StFNIW
 nFtmXpz02hr3bUPqcsoYKTzz2oL5Fp4Aidg+SqEazERDBc8x1d8r+xYDD4AE8VltcgLz
 uUdq8rrcNWvEIQQVUgiGjyoZrJeWklBCWMxsuOwsPVqNJSGiDEwjupQ8bU6IBH1zfpfC
 dJhz4tJvbEiNzy7zZ5Z3xlco2j4eq7hC06Po2oILTFxHQWUR8yin5hgW0Z9X/XmS2Y7t
 dsog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:cc:references:from:in-reply-to
 :content-transfer-encoding;
 bh=/NESL/+tPWPWySlHbBqnDjFcSjDmBJZ4kPsSVyXO4wo=;
 b=PdxnFKVSOyt8rqUoG4z03/aqcZfcTCizf3ksQgodwXnbe1GlKopMJep/O+P1FWVtfO
 AxWawFrQ9HzLWei/NRhjstWs2QUvKlot1ZDcNZUkdHNRICzHynIE6UC1d5Nvd7HotzAQ
 PHJX2HUAwidVROuGopFEdKQ3V3d8DCT1uXgiWcwiPyQbS1K9PGj/4pWNdbCiNd8ifb7S
 plRte+GSdq8sSeUX8w94akx++Xtzb1vlgxEh8us1ceaeuQkFAHg2ZcRjdHuAeFlMQm3e
 oQfovox3NcwAOlHOYNpDeVpvD+igcurHkkRCh+NdGuf++agcldt8MXmQR9UW+MpXbfVz
 0gyw==
X-Gm-Message-State: AOAM532rFHyRgkCUsyPjqDYaXWJx+Mpdk6RmwQ2fVu+VP2ipJDlqo9IG
 TA1w7EIDM5pQd56vOxqiGZ8=
X-Google-Smtp-Source: ABdhPJy3uSCRcaYrvdYMZMYcJmA47mcNDD4EoGKvB/Wm4lbxdsiZnclnzHEROG9yS2QC6vGv1JiORQ==
X-Received: by 2002:a7b:ce04:0:b0:38c:6c34:9aac with SMTP id
 m4-20020a7bce04000000b0038c6c349aacmr10306544wmc.142.1650765611820; 
 Sat, 23 Apr 2022 19:00:11 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id
 c11-20020a05600c0a4b00b0037c91e085ddsm10092969wmq.40.2022.04.23.19.00.10
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 23 Apr 2022 19:00:11 -0700 (PDT)
Message-ID: <873e04ab-0e7c-c750-21ff-320c84c9b64e@HIDDEN>
Date: Sun, 24 Apr 2022 05:00:09 +0300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
Content-Language: en-US
To: Eli Zaretskii <eliz@HIDDEN>
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN> <83zgkhszhp.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <83zgkhszhp.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Hi Eli,

Sorry for the slow reply.

On 19.04.2022 21:24, Eli Zaretskii wrote:
> Dmitry, there's something here I don't understand.  In
> semantic-symref-perform-search method that uses find/grep, we do this:
> 
>      (with-current-buffer b
>        (erase-buffer)
>        (setq default-directory rootdir)
>        (let ((cmd (semantic-symref-grep-use-template
>                    (directory-file-name (file-local-name rootdir))
>                    filepattern grepflags greppat)))
>          (process-file semantic-symref-grep-shell nil b nil
>                        shell-command-switch cmd)))
> 
> Since we bind default-directory to ROOTDIR, why do we also need to
> pass ROOTDIR to semantic-symref-grep-use-template?  Why not use ".",
> or even nil (which gets expanded to "." AFAIU)?  Then this entire
> issue with embedded blanks in ROOTDIR would not have happened, because
> the problematic directory name would not be exposed to the shell.
> 
> What am I missing here?

This approach dates back to before CEDET was added.

But I imagine the logic was similar to what I used in: 
xref-matches-in-directory that it's easier to handle absolute file names 
which Grep outputs this way, rather that concatenate them later.

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.

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

diff --git a/lisp/cedet/semantic/symref/grep.el 
b/lisp/cedet/semantic/symref/grep.el
index 27ea80fc32..025faf1042 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -139,6 +139,8 @@ semantic-symref-grep--quote-grep
                              (lambda (s) (concat "\\" s))
                              string nil t))

+(defvar semantic-symref-grep-local-dir nil)
+
  (cl-defmethod semantic-symref-perform-search ((tool 
semantic-symref-tool-grep))
    "Perform a search with Grep."
    ;; Grep doesn't support some types of searches.
@@ -170,11 +172,12 @@ semantic-symref-perform-search
        (erase-buffer)
        (setq default-directory rootdir)
        (let ((cmd (semantic-symref-grep-use-template
-                  (directory-file-name (file-local-name rootdir))
+                  "."
                    filepattern grepflags greppat)))
          (process-file semantic-symref-grep-shell nil b nil
                        shell-command-switch cmd)))
-    (setq ans (semantic-symref-parse-tool-output tool b))
+    (let ((semantic-symref-grep-local-dir (directory-file-name 
(file-local-name rootdir))))
+      (setq ans (semantic-symref-parse-tool-output tool b)))
      ;; Return the answer
      ans))

@@ -190,12 +193,12 @@ semantic-symref-parse-tool-output-one-line
            ((eq (oref tool resulttype) 'line-and-text)
             (when (re-search-forward grep-re nil t)
               (list (string-to-number (match-string line-group))
-                   (match-string file-group)
+                   (concat semantic-symref-grep-local-dir (substring 
(match-string file-group) 1))
                     (buffer-substring-no-properties (point) 
(line-end-position)))))
  	  (t
  	   (when (re-search-forward grep-re nil t)
  	     (cons (string-to-number (match-string line-group))
-		   (match-string file-group))
+		   (concat semantic-symref-grep-local-dir (substring (match-string 
file-group) 1)))
  	     )))))

  (provide 'semantic/symref/grep)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 18:24:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 14:24:35 2022
Received: from localhost ([127.0.0.1]:44100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngsWh-0004QB-34
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 14:24:35 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ngsWf-0004Py-A2
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 14:24:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46214)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngsWZ-0007z4-VW; Tue, 19 Apr 2022 14:24:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=+Nbw1qazuZun06JkYBdmKABOq0Glgl/QpymYxnCaq7U=; b=ZZeZLVNTSqSE
 1zGV1rg+XD36E6hE15yl2BwUFegQ7oC4mS0fhI4ZepI6A9Y4UKXwdhtq0klvBCdW5QedL9TdDFQWg
 f66V/Qa8qp2LWv+RTgYVwFSQqLADjRLvhw6kL6+20rXb2na5Nk1+TeLgSPl6HO5tlALgndpsdLQfM
 ZzH+/tBWtfOobeMw5T/iKOdgCeNOWGAvILOFocSc0tZImFoz+HB3wYeRty+514BUH4FmovYO/OP06
 F0PmzrGowuY+IlpafyGwoA92wUCgiaGIcCmKwewigLhuWXGOd7EYGWLQ1JLVDt/utBHwGpYr+PwNA
 TT3ur257bOo6+JZ76gaGfA==;
Received: from [87.69.77.57] (port=3967 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngsWZ-00015q-Do; Tue, 19 Apr 2022 14:24:27 -0400
Date: Tue, 19 Apr 2022 21:24:18 +0300
Message-Id: <83zgkhszhp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <831qxtuee8.fsf@HIDDEN> (message from Eli Zaretskii on Tue, 19
 Apr 2022 21:17:03 +0300)
Subject: Re: bug#55016: 28.1;
 xref-find-references finds no matches if project dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 <831qxtuee8.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org, spepo.42@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 19 Apr 2022 21:17:03 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 55016 <at> debbugs.gnu.org
> 
> > > Actually, one more idea: perhaps the quoting makes things first
> > > because your file names begin with "~/"?  In that case, doing
> > > something like this instead should do better:
> > >
> > >    (shell-quote-argument (expand-file-name rootdir))
> > 
> > That works! Both 'space dir' and 'nospace' dir cases work the same way now.
> 
> OK, thanks.  Now I understand what's going on, and can work on a real
> fix for Emacs 29.

Dmitry, there's something here I don't understand.  In
semantic-symref-perform-search method that uses find/grep, we do this:

    (with-current-buffer b
      (erase-buffer)
      (setq default-directory rootdir)
      (let ((cmd (semantic-symref-grep-use-template
                  (directory-file-name (file-local-name rootdir))
                  filepattern grepflags greppat)))
        (process-file semantic-symref-grep-shell nil b nil
                      shell-command-switch cmd)))

Since we bind default-directory to ROOTDIR, why do we also need to
pass ROOTDIR to semantic-symref-grep-use-template?  Why not use ".",
or even nil (which gets expanded to "." AFAIU)?  Then this entire
issue with embedded blanks in ROOTDIR would not have happened, because
the problematic directory name would not be exposed to the shell.

What am I missing here?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 18:17:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 14:17:21 2022
Received: from localhost ([127.0.0.1]:44087 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngsPg-0004F5-TL
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 14:17:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53326)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ngsPe-0004Es-F4
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 14:17:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46090)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngsPZ-00078t-3E; Tue, 19 Apr 2022 14:17:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=FvXHSTs8dpO/4MFsFn4lxs7TghFELwDZ6HlMrHVOtMM=; b=FXO66Cdraq6I
 GvHXc+V4Ry2GLmF2U7n471RfBFjLFtZOOLBdJll3beTrYAPlGHoPojCD/XU+au2BsfKV3lTbYvCSm
 3a5Ku3T3EvptXI7P/aYgPso11X/Valf85p7HRwrO4MBGGFQoWCGGeIUg5K4oQukc9kFvBLwHEaAcH
 8YSbMRnLd89KzpRkdXBatwnyhma1O7XucYbiT7ibAerE3TCvQmmXe1K8zzH4LWBtiuSV+Y3IJtPCE
 +0PjCsw3RosaxuFfsPSLL1ER0g4FeH7Vda5z1Ykq3flm5efYdfcxIVpR8iTXBzB61iIFSu5zv8/y9
 eJIUPmvegkTkreK9O79NWw==;
Received: from [87.69.77.57] (port=3521 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngsPY-0000a0-JL; Tue, 19 Apr 2022 14:17:12 -0400
Date: Tue, 19 Apr 2022 21:17:03 +0300
Message-Id: <831qxtuee8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter Povinec <spepo.42@HIDDEN>
In-Reply-To: <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
 (message from Peter Povinec on Tue, 19 Apr 2022 10:57:29 -0700)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
 <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Povinec <spepo.42@HIDDEN>
> Date: Tue, 19 Apr 2022 10:57:29 -0700
> Cc: 55016 <at> debbugs.gnu.org
> 
> On Tue, Apr 19, 2022 at 10:37 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> >
> > Actually, one more idea: perhaps the quoting makes things first
> > because your file names begin with "~/"?  In that case, doing
> > something like this instead should do better:
> >
> >    (shell-quote-argument (expand-file-name rootdir))
> 
> That works! Both 'space dir' and 'nospace' dir cases work the same way now.

OK, thanks.  Now I understand what's going on, and can work on a real
fix for Emacs 29.

> BTW, the symlinks are not essential to my recipe. You can instead
> create two new
> directories and copy in xref.el in Step 1.

That has other complications, like the command asks me for a project
etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 17:57:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 13:57:47 2022
Received: from localhost ([127.0.0.1]:44076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngs6k-0003kT-UW
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:57:47 -0400
Received: from mail-vk1-f179.google.com ([209.85.221.179]:37861)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spepo42@HIDDEN>) id 1ngs6j-0003kG-4o
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:57:45 -0400
Received: by mail-vk1-f179.google.com with SMTP id r8so5124512vkq.4
 for <55016 <at> debbugs.gnu.org>; Tue, 19 Apr 2022 10:57:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=GNeF2XOzu80VMYJDnWSHHZXDqz08lbCdkFarSQGxhIQ=;
 b=jk4Lqd42l+x9Gvc51e1zOS2yb2WHFcQzoY5HvNur+n0VYtQNY2hbGQAv0JvySRRVCb
 pu8g5TOJwvyhQxU+XD+JJs+JYhAGK/8XDnw8Lzr3i+40ONYLyby+tQDZsm66rq7/CLZv
 1El33BQ8mHp4G/77gOC+oKeMJFqiLk7k92PgtMrQt/moK9Z4Da72BXboFL6fwM/D41vS
 EzVF3W1RWflxiwtgyeLZB+OHxWm0MCuuR7jn3s64HtJeCUHmLa6skdjh5QrwZn7K7RMd
 n/dVuSMVHVVA3+ZUJG2dJ2EPPsPydSYF+ZT8ZhKh09PD2DUZnGOZ18z4uwL0KJf401BV
 R5wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=GNeF2XOzu80VMYJDnWSHHZXDqz08lbCdkFarSQGxhIQ=;
 b=3ApbC8m03C2849xL5OrJ2eWtkARpalOY4KqcxIERARD0VNlQ6oCMsY3WkkPa6IYd4k
 adhTeGVHxvppYgafbFWUSVmc8dQdWTrqMPA4V+bO5MyAUx62erhkMLznJtumnU/hnlU+
 1YPyG/Igu+jxCpCW/YlqjNalDSWL9rWs4bC8Uq/r6/MGbfKoSAE7dU0ElDXRKqYRdG1V
 Ti5o3irsOWBuqNun/nnYFDq+abs13mMQRMYbKId5r1MBW3/NhXLgfe99Wq9x2tYwaI/+
 eM6T5zVNFOMEaX8qXyHbjDUTd9H7XbwfffHZWH/JziBBfTLCKvYLqp1YYYoe3zuSLJaO
 q9zg==
X-Gm-Message-State: AOAM531gR5kcI6tsb0docciFjF257zjdFZtBkPR46FrYBV1CqGUQ+yvo
 UrWT1CiObMAnotsTOlnEIl2sDmIK+KIGG9yjJzwdMZaE
X-Google-Smtp-Source: ABdhPJwcU9kEPfBGr3Ob2siOZ9ivRPATMBIP55cXUfQ4LI4t0tkWgA5AVFLOBhyVn69vqcVkFY66kQBAYObBNI3Gu8U=
X-Received: by 2002:a1f:a30a:0:b0:345:c598:72cc with SMTP id
 m10-20020a1fa30a000000b00345c59872ccmr4847807vke.0.1650391059599; Tue, 19 Apr
 2022 10:57:39 -0700 (PDT)
MIME-Version: 1.0
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 <8335i9ug94.fsf@HIDDEN>
In-Reply-To: <8335i9ug94.fsf@HIDDEN>
From: Peter Povinec <spepo.42@HIDDEN>
Date: Tue, 19 Apr 2022 10:57:29 -0700
Message-ID: <CAJDw7KtwvH=JxaTOu=W5cgSC0ihOXyEV--R1eyMZHrvww02ALg@HIDDEN>
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On Tue, Apr 19, 2022 at 10:37 AM Eli Zaretskii <eliz@HIDDEN> wrote:
>
> Actually, one more idea: perhaps the quoting makes things first
> because your file names begin with "~/"?  In that case, doing
> something like this instead should do better:
>
>    (shell-quote-argument (expand-file-name rootdir))

That works! Both 'space dir' and 'nospace' dir cases work the same way now.

BTW, the symlinks are not essential to my recipe. You can instead
create two new
directories and copy in xref.el in Step 1.

Thanks for your help and super fast response.
Peter




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 17:37:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 13:37:13 2022
Received: from localhost ([127.0.0.1]:44064 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngrmr-0003Dl-2R
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:37:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47098)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ngrmp-0003DW-9O
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:37:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45528)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngrmk-00016Q-1E; Tue, 19 Apr 2022 13:37:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=O32sKC+xvcIvBua1VxFs3niWcEOKkGlZYfGWC1Tl/s4=; b=Ql0BE0/vxbhj
 o3WeQAOffhq8Ox/SP2kYV7pEcHjBCqUqX81JVT9wewZsGFhBT6cxVK2/Qr8Eb/qH3AsubEkyjQDwM
 gxKA8qfyMNz/geme6HrBJeHsHCqIESLo7bjVnK0o2j9ZWcpzZFipgreyRXsZj//CfLabMQog8wL8v
 gZW/c35CiVRK1Bgq0z38GyYpzppXz6KViD5vcbqSK8amz1t9XKcZUjWMuHweWkKaz5/wiXGQ34yvJ
 q3sX5te14LnnWvjBwXnbEs0XvVEZUljKK2g7iJ39t/9uBJJUVn5wrxYGsLSQwu+ltgPAE5RR2dnID
 Q608R0g8bFIPPEu156420Q==;
Received: from [87.69.77.57] (port=1030 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngrmj-0003uz-Ge; Tue, 19 Apr 2022 13:37:05 -0400
Date: Tue, 19 Apr 2022 20:36:55 +0300
Message-Id: <8335i9ug94.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter Povinec <spepo.42@HIDDEN>
In-Reply-To: <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 (message from Peter Povinec on Tue, 19 Apr 2022 10:06:28 -0700)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Povinec <spepo.42@HIDDEN>
> Date: Tue, 19 Apr 2022 10:06:28 -0700
> Cc: 55016 <at> debbugs.gnu.org
> 
> The patch actually makes it worse. Now even the 'nospacedir' case fails
> the same way (steps 6 and 7 in my recipe).

Actually, one more idea: perhaps the quoting makes things first
because your file names begin with "~/"?  In that case, doing
something like this instead should do better:

   (shell-quote-argument (expand-file-name rootdir))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 17:33:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 13:33:05 2022
Received: from localhost ([127.0.0.1]:44059 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngrir-00037m-GB
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:33:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46276)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ngrip-00037E-UV
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:33:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45476)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngrik-0000Fr-Mg; Tue, 19 Apr 2022 13:32:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Cubu5PdNp+tJBOSPLU1GbTF1+HD+Mgai/caF4FcwCV4=; b=jl667JHgAVC/
 EIJSRVb9CAOUvN7C0Fzfvs49vXD5UM/zH6bXc39KBp74laoiT9bsOtx0lUUBIHabZkZNtQUwr2d75
 a6lAtgzXZoIlPhhgpCeEGcVnRkpNghnXTpdqHParWqnyywmnHxzh+bFDqXGGgDvE+BgMmqcwZmegM
 TXVSR58z+XWsbgKZmjpQgj6vUwJXKc2CfhAz3lfZA+aGr+Mu/kgg+7hAEYbXrhOHjmnhylsEDnRDi
 KuW4SvzztkoGNPRiaTi9AbCwv7Mn/neW2TNIOnFVXTDi0DQWnIUAWNk4AgCRU92e2YEFFy2S0pYQZ
 10diEx3VBv26bAek515v9w==;
Received: from [87.69.77.57] (port=4747 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngrij-0002Wd-Oe; Tue, 19 Apr 2022 13:32:58 -0400
Date: Tue, 19 Apr 2022 20:32:48 +0300
Message-Id: <834k2pugfz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter Povinec <spepo.42@HIDDEN>
In-Reply-To: <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
 (message from Peter Povinec on Tue, 19 Apr 2022 10:06:28 -0700)
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
 <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Povinec <spepo.42@HIDDEN>
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 17:06:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 13:06:45 2022
Received: from localhost ([127.0.0.1]:44032 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngrJN-0002Sn-7f
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:06:45 -0400
Received: from mail-vs1-f49.google.com ([209.85.217.49]:36690)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spepo42@HIDDEN>) id 1ngrJM-0002Sc-Bp
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 13:06:44 -0400
Received: by mail-vs1-f49.google.com with SMTP id a127so16278061vsa.3
 for <55016 <at> debbugs.gnu.org>; Tue, 19 Apr 2022 10:06:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=isziPi7rclq/F1QFFX/XjfLlzg9a0tapoPyGJ1Y7X3c=;
 b=c22re5QWRWOQ6ae/D4uj+McJXGasSUkcOnVdSvJ1VRZhZ0NVjIssvK7Bcz9S9/6fzy
 kPp3044cBOVRYN//FEUwIgorPX7xQvcnzg90+5S8/knWDFkendFiuVz9WVPT2/9LZTEe
 zwRuJiva2DWkc63qsFweU8y3sRw22UegpB12T1hyKDIgxjPoV4Y0YYdWfEp0VmV7sbEw
 hpfWRUoAAgvRwZkl5xYgNVrnFUuKFz5tpJfb3SG17823LGQzXKiqvfpxhM2KFuMNcPVt
 hxivePXDLF72BDDR6olvDSGcab0pXHnLR4gTjdcjF2WNMTRP6XRS363+xfbZDJqR47ld
 acbw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=isziPi7rclq/F1QFFX/XjfLlzg9a0tapoPyGJ1Y7X3c=;
 b=61DcnWLhuSp0R9dsoTqHe2XkLZ3yBz4gasISQ2jxTYM8giwK6ffuplCmAKsG9V+CLC
 f1rs33bWLxOORgpcAFAevxa1OB5ZEvcZQ834aOmf1pIKQJeZ1DOKAnf+mBdKhhEzpSRl
 JwRTWKMrWAcP+B/kqhaA6+qBPsRrQK3cgqK/e2VPTrBzITj+qXjuX2p0KD6QdRp2h85Y
 P2P5crHxNEgfKkClh4uGAN4kLMYfOdCiFh0lT15viRZ8KDzFMdD2T5eBM9qIESMb69lX
 QWi7Y3NO7jPTO8RFU8wK46aMTiMTNdnq5LYXriXuePgRmvpsT6L48r74QrN3JUdIzbiR
 xuOg==
X-Gm-Message-State: AOAM530Azg41WABxSmDjQ3NXoYCVtq0tYGUfXiVOGrGRlLeb6tbJKSau
 9g+UMTMiArWicTQgebdQc3SyxBvRsi1TORHE4fI=
X-Google-Smtp-Source: ABdhPJzcuu+HLvk/B/m0x5W71fglhCemEPvMTyEwmZ3JJtidIcxZX5NrpLmt5aiE5NRWKTp1cCPVCHvNlTZrRf1cQx8=
X-Received: by 2002:a67:ea51:0:b0:320:c3a9:414b with SMTP id
 r17-20020a67ea51000000b00320c3a9414bmr5408243vso.81.1650387998857; Tue, 19
 Apr 2022 10:06:38 -0700 (PDT)
MIME-Version: 1.0
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 <83o80xv944.fsf@HIDDEN>
In-Reply-To: <83o80xv944.fsf@HIDDEN>
From: Peter Povinec <spepo.42@HIDDEN>
Date: Tue, 19 Apr 2022 10:06:28 -0700
Message-ID: <CAJDw7KuaXwfR097qD+2YUD=0NvDdbErojFgZgr0k9-kknRc_+w@HIDDEN>
Subject: Re: bug#55016: 28.1; xref-find-references finds no matches if project
 dir contains a space
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On Tue, Apr 19, 2022 at 12:13 AM Eli Zaretskii <eliz@HIDDEN> wrote:
>
> 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.
I believe it is just doing find+grep underneath.

> 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).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 55016 <at> debbugs.gnu.org:


Received: (at 55016) by debbugs.gnu.org; 19 Apr 2022 07:13:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 03:13:49 2022
Received: from localhost ([127.0.0.1]:41553 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngi3Y-0001SP-Qe
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 03:13:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51066)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ngi3Y-0001SD-5E
 for 55016 <at> debbugs.gnu.org; Tue, 19 Apr 2022 03:13:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60596)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngi3S-00076t-Tc; Tue, 19 Apr 2022 03:13:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=L1sA8tNDO0ZByTEhB+WKcwOPQSKZjUrzaDvM/qWpi9o=; b=U2pxmX37H6ez
 jmGWz06+kBUItHR2Btfd3Dlj5L7mRrmng/C7WobNpcNK6m7Mje85i+EA/rRmSB7W+ElSWtbmYifGg
 pmu1TtDTt1GACxtvnl8RDr2OYrJvqwNvLVRrl6dlk4wTWtbBMGf/G6wXzoZtjI055xpe0Gnr0WlEA
 0XUFPLcyeu+qgabX/8YOgz8xPSV1YbYUneHn+8UYffgLBd8hTTj9gRftZ/ZTaa1DxmuL9U62gQ1PS
 lHHky86UEBeRGfkO7qwDE6D9JeCMdDRc1uZlYUO406MBZFu4wjU8E87l+THHckL0LEJIxl2gVGs5C
 qCg8Jhbhw62zqxAsOMKVIQ==;
Received: from [87.69.77.57] (port=1789 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ngi3R-0007jh-DC; Tue, 19 Apr 2022 03:13:42 -0400
Date: Tue, 19 Apr 2022 10:13:31 +0300
Message-Id: <83o80xv944.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter Povinec <spepo.42@HIDDEN>
In-Reply-To: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
 (message from Peter Povinec on Mon, 18 Apr 2022 21:52:49 -0700)
Subject: Re: bug#55016: 28.1;
 xref-find-references finds no matches if project dir contains a space
References: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55016
Cc: 55016 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Povinec <spepo.42@HIDDEN>
> Date: Mon, 18 Apr 2022 21:52:49 -0700
> 
> Here is a contrived scenario to reproduce the issue:
> 1. create two symlinks like
> ln -s ~/Applications/Emacs.app/Contents/Resources/lisp/progmodes
> ~/space\ dir
> ln -s ~/Applications/Emacs.app/Contents/Resources/lisp/progmodes
> ~/nospacedir
> 2. C-x C-f ~/space dir/xref.el
> 3. M-? on xref-location-marker, specify default project and default
> directory ~/space dir
> 4. Observe "No references found for: xref-location-marker"
> 5. Close the xref.el buffer with C-x k
> 6. Repeat steps 2-3, but using  ~/nospacedir instead
> 7. Observe that references are shown correctly

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
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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Apr 2022 04:58:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 19 00:58:27 2022
Received: from localhost ([127.0.0.1]:41399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ngfwZ-0006I3-9n
	for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 00:58:27 -0400
Received: from lists.gnu.org ([209.51.188.17]:58814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spepo42@HIDDEN>) id 1ngfrL-00069z-J3
 for submit <at> debbugs.gnu.org; Tue, 19 Apr 2022 00:53:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50534)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spepo42@HIDDEN>) id 1ngfrL-0003ae-BX
 for bug-gnu-emacs@HIDDEN; Tue, 19 Apr 2022 00:53:03 -0400
Received: from mail-ua1-x92c.google.com ([2607:f8b0:4864:20::92c]:38900)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <spepo42@HIDDEN>) id 1ngfrJ-0004LH-M8
 for bug-gnu-emacs@HIDDEN; Tue, 19 Apr 2022 00:53:03 -0400
Received: by mail-ua1-x92c.google.com with SMTP id y2so5453638uaq.5
 for <bug-gnu-emacs@HIDDEN>; Mon, 18 Apr 2022 21:53:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to;
 bh=3lOHrP3/84cusWaRjR8SdGBi9VdfdivX/ar9Zaa7YLM=;
 b=N3TitHWh47xbKhwCU7+HS8J6+3vmHD2ULYf4j6FKwlj2UE1PvQJS1+JbPCd6yrvt6Z
 X0xHEOAzfRAew4DkGiNpwwzoDIbpCbAL1ZV6zKGHwyiGOGkT3dTFO1AFYe2/1mhN8QhZ
 3uaJDNX5CY4ekEYOF1NyUJPcDJvjsr7TWJVtkdzzfx+B6e+Gq5mVaHsY87AGyzfXuU0x
 4Ut/HiOdLiCKMv0HRi7JKaLxdfZZnEy0bbRqcGtloF0Zvebbhgdpn36iIqGFmlfEE6Ea
 DdPmdJ+DQRALIP0HlERkzdO2jSkviTtHlz/tu8HRQspQsP/OMtHI+7R67FijPPNt28B1
 X0iw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=3lOHrP3/84cusWaRjR8SdGBi9VdfdivX/ar9Zaa7YLM=;
 b=Xcq5qIB045dVbK0YPBVl/jLSbX2dfkQC6R2po/jM3EmTPTslEKdaJg3jXlyF3V1FPd
 L9dRcUX86fhQV8N+G+ybPeE2tNDF2ceJPlynhX5Jdyu+Tgg73RJGyXftoQVXRVt+b+wO
 4fIp6WbeszD9pb5oir2Vapfji43UO8CqC1ABMXtXZxzV45G+N7wP0IuvxuVQao1pjw5u
 uSDw8F9NTQPE80SybN6Imy0JaygA1cIBtCvBbwkx/J2vmbJOO0ZN5N8Tbv+qL0M9NB2K
 h/aEJXA8rs1RoXsgMquASos74u/7i35xv3/vTBWqxWgrn4tbpD8+yaGQhVlSupWUFUrp
 8itw==
X-Gm-Message-State: AOAM5327Xd5b33Kc3hpmqXVNhzIC05PSsZMXtA1g6Ch8ItUYGkqLNlwO
 seoHOZfs9Xu33f5/KTySy282azZGGXnK7Pe4xYQ+DRw8fNs=
X-Google-Smtp-Source: ABdhPJwcWsGSmbI/kCqneV7v5M/gHVRGFWV/BskBH52vMymoUdzjcqhPKzx92sSC7LWamYXs7dmb1c6M1FUNTYaRiGw=
X-Received: by 2002:ab0:2556:0:b0:35d:46f6:76a5 with SMTP id
 l22-20020ab02556000000b0035d46f676a5mr3430448uan.64.1650343980162; Mon, 18
 Apr 2022 21:53:00 -0700 (PDT)
MIME-Version: 1.0
From: Peter Povinec <spepo.42@HIDDEN>
Date: Mon, 18 Apr 2022 21:52:49 -0700
Message-ID: <CAJDw7KuHURaz5X1S7ZLiOkotA_QySKEJnR-FwxxCWt1BtfOyRA@HIDDEN>
Subject: 28.1;
 xref-find-references finds no matches if project dir contains a space
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2607:f8b0:4864:20::92c;
 envelope-from=spepo42@HIDDEN; helo=mail-ua1-x92c.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 19 Apr 2022 00:58:24 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

I despise spaces in directory names like the next guy, but sometimes it
is unavoidable. In my case, I had some elisp files in apple
icloud shared folder, and those are mounted by the system
under a nasty path like
~/Library/Mobile\ Documents/com~apple~CloudDocs.
If I loaded one of those files and tried xref-find-references,
it would never find anything, not even references within the same file.

Here is a contrived scenario to reproduce the issue:
1. create two symlinks like
ln -s ~/Applications/Emacs.app/Contents/Resources/lisp/progmodes
~/space\ dir
ln -s ~/Applications/Emacs.app/Contents/Resources/lisp/progmodes
~/nospacedir
2. C-x C-f ~/space dir/xref.el
3. M-? on xref-location-marker, specify default project and default
directory ~/space dir
4. Observe "No references found for: xref-location-marker"
5. Close the xref.el buffer with C-x k
6. Repeat steps 2-3, but using  ~/nospacedir instead
7. Observe that references are shown correctly

We should be able to handle directories with spaces. If for some reason
we couldn't do that, we'd need to inform the user explicitly.

Workaround to the original problem where the elisp files are
stored under a directory with spaces in it:
1. Create a symlink pointing to a subdir under the directory that
contains the space so you have a pathname to the files without any space.
2. Configure the mapping from the full pathname to the symlink using
directory-abbrev-alist to tell emacs to use the symlink directory name
whenever creating buffers of files under the space-containing directory.



In GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS
appkit-2113.00 Version 12.0.1 (Build 21A559))
 of 2022-04-04 built on armbob.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.2.1

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 50996 6609)
 (symbols 48 6552 1)
 (strings 32 17843 2090)
 (string-bytes 1 596645)
 (vectors 16 13825)
 (vector-slots 8 184230 11069)
 (floats 8 21 39)
 (intervals 56 301 0)
 (buffers 992 11))




Acknowledgement sent to Peter Povinec <spepo.42@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#55016; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 26 Apr 2022 12:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.