summaryrefslogtreecommitdiff
path: root/lisp/progmodes/project.el
diff options
context:
space:
mode:
authorFelicián Németh <felician.nemeth@gmail.com>2019-02-02 13:22:53 +0100
committerMichael Albinus <michael.albinus@gmx.de>2019-02-02 13:22:53 +0100
commit2f55b971b42d13188157331a1e514949f20ced4f (patch)
tree9ba2927e710949ed091adc12479eb4db1622d29f /lisp/progmodes/project.el
parent30c09955f64815201ae9b86215fed8ea2af0ba66 (diff)
downloademacs-2f55b971b42d13188157331a1e514949f20ced4f.tar.gz
emacs-2f55b971b42d13188157331a1e514949f20ced4f.tar.bz2
emacs-2f55b971b42d13188157331a1e514949f20ced4f.zip
Fix Bug#34221
* lisp/progmodes/project.el (project--files-in-directory): Support remote files. (Bug#34221)
Diffstat (limited to 'lisp/progmodes/project.el')
-rw-r--r--lisp/progmodes/project.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 3603e751fee..815cc7cd3d3 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -189,9 +189,11 @@ to find the list of ignores for each directory."
(defun project--files-in-directory (dir ignores &optional files)
(require 'find-dired)
(defvar find-name-arg)
- (let ((command (format "%s %s %s -type f %s -print0"
+ (let ((default-directory dir)
+ (remote-id (file-remote-p dir))
+ (command (format "%s %s %s -type f %s -print0"
find-program
- dir
+ (file-local-name dir)
(xref--find-ignores-arguments
ignores
(expand-file-name dir))
@@ -205,7 +207,8 @@ to find the list of ignores for each directory."
" "
(shell-quote-argument ")"))"")
)))
- (split-string (shell-command-to-string command) "\0" t)))
+ (mapcar (lambda (file) (concat remote-id file))
+ (split-string (shell-command-to-string command) "\0" t))))
(defgroup project-vc nil
"Project implementation using the VC package."