GNU bug report logs - #40940
27.0.91; project-query-replace-regexp stops too early

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> runbox.com>

Date: Tue, 28 Apr 2020 14:57:02 UTC

Severity: normal

Found in version 27.0.91

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: simenheg <at> runbox.com, monnier <at> IRO.UMontreal.CA, 40940 <at> debbugs.gnu.org
Subject: bug#40940: 27.0.91; project-query-replace-regexp stops too early
Date: Wed, 29 Apr 2020 22:09:12 +0300
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 " "




This bug report was last modified 5 years and 112 days ago.

Previous Next


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