From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#40940: 27.0.91; project-query-replace-regexp stops too early Date: Wed, 29 Apr 2020 22:09:12 +0300 Message-ID: <0c8d25ad-4da3-e6fd-2db7-cea49c395cd0@yandex.ru> References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> <87d07q2l3a.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107067"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 29 21:13:18 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTs8z-000RjD-Vj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 21:13:17 +0200 Original-Received: from localhost ([::1]:43512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTs8z-0002oI-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 15:13:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41890) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTs5r-0007Gb-VQ for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 15:10:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTs5q-0006KY-SL for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 15:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTs5q-0006HP-CX for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 15:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTs5q-0004Nh-6u for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 15:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Apr 2020 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40940 X-GNU-PR-Package: emacs Original-Received: via spool by 40940-submit@debbugs.gnu.org id=B40940.158818736416790 (code B ref 40940); Wed, 29 Apr 2020 19:10:02 +0000 Original-Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 19:09:24 +0000 Original-Received: from localhost ([127.0.0.1]:44620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTs5D-0004Mk-P7 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 15:09:23 -0400 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:38157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTs5B-0004MW-02 for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 15:09:22 -0400 Original-Received: by mail-wm1-f45.google.com with SMTP id g12so3257534wmh.3 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 12:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OqNHGO5nJM4gh/YyvIlThHG1VBtQ0y1HJ7QQxtzgCsM=; b=iruMLuE2Sz01SKOW4kAwbPP+Chh81G9ivEnSdIwDW7EDK5afz1Q5Iyp+U+gAuXOX5t twWnCjMY2L/CMGgbb+ibHsD6u15rP3NLz1ophk7C7HhEF7EnM1ao/+6T8SdeCu505apm +QPjyBDnvfGIGwmszdQANZKqt2bFIm/7EiCdKQWv0WSIYq5hgu2Dt0izeDXt32aY8EjV OR4WEnG09r1avqv9FM1KEtRKgRLff6cDNWuNFpLMwMgJW3pr/RXX8RIXTXazvmKQIer1 B1O8KCyVGpcxfE7aLCz21SxWLzFQB5VSkBVbVo8vL336EgxhZLk4dDpDiK4FaedjDQRY OZDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OqNHGO5nJM4gh/YyvIlThHG1VBtQ0y1HJ7QQxtzgCsM=; b=JRhhNE1Fkqjn/p0c4MwQwgkUltftiepIWnMKDnTxWmfrXAjCabjOmKioY+dL5lf01Y QIJfeyTYXNdIkBw7Rx37lrOCjwkg+K+pppFVDua4J3MOzq7QV72w/8i1Lp6GFf2wS+zy jUs2n//FtBzXaZPxl6gAvDPARvlZRVNvfkIjlFc6SxiD/a1lId/VDgcSCA8unsRgxOyF qwhqjcFmciDTUIcMnUnTzjlXhMmssiRhk8NiB2JtyGzXhmk97YAA7kXl6woflqqFO71E uy7gnfKJU3JJ3F2xK6uUSXCx92YuShRRn6GMjp/5jjI5xSH2EhlZluLENl26udQ8xyI6 rvjw== X-Gm-Message-State: AGi0PubYTOEOu73HEKCgC2c+aL/GNtJp4YVf/kEpC1DbhjTMVtCoGEPW IEdGiJj8sUGmveWB6VM2Dx3WNu2VQ6g= X-Google-Smtp-Source: APiQypK4jtXBbigEnpF/pLW5er7hka9vBpnwgt4HjsRxwtJMGq9Jn4FUNv+fCkYR5Y8kd+V8JKHj6w== X-Received: by 2002:a7b:c759:: with SMTP id w25mr5293035wmk.68.1588187354893; Wed, 29 Apr 2020 12:09:14 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id b12sm330878wro.18.2020.04.29.12.09.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 12:09:14 -0700 (PDT) In-Reply-To: <87d07q2l3a.fsf@gmx.de> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179349 Archived-At: On 29.04.2020 21:38, Michael Albinus wrote: > No. dir is a remote file name. So you must still declare dirname as > (file-local-name dir). Right, thank you. I also see no reason not to pass the local name to xref--find-ignores-arguments (xref-matches-in-directory ends up doing that already). So the patch will be: diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index dbc967b885..f5f4092bab 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -186,16 +186,14 @@ project--files-in-directory (require 'xref) (defvar find-name-arg) (let* ((default-directory dir) - (dirname (file-remote-p dir 'localname)) - (dirname (or dirname - ;; Make sure ~/ etc. in local directory name is - ;; expanded and not left for the shell command - ;; to interpret. - (expand-file-name dir))) + ;; Make sure ~/ etc. in local directory name is + ;; expanded and not left for the shell command + ;; to interpret. + (localdir (file-local-name (expand-file-name dir))) (command (format "%s %s %s -type f %s -print0" find-program - dirname - (xref--find-ignores-arguments ignores dirname) + localdir + (xref--find-ignores-arguments ignores localdir) (if files (concat (shell-quote-argument "(") " " find-name-arg " "