diff options
| author | Glenn Morris | 2020-05-03 07:50:20 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-05-03 07:50:20 -0700 |
| commit | c6d70f890cee2f5a561dcea0a5ef2de0cbbf1baf (patch) | |
| tree | 478b320e8040ec73d218611c24e7832c10b0b54d /lisp/progmodes | |
| parent | 5f516dc94419d8ccfad6bf31a752d33f797f837c (diff) | |
| parent | 1f17193e00692b1bb9739415b0b56ed8f16f049f (diff) | |
| download | emacs-c6d70f890cee2f5a561dcea0a5ef2de0cbbf1baf.tar.gz emacs-c6d70f890cee2f5a561dcea0a5ef2de0cbbf1baf.zip | |
Merge from origin/emacs-27
1f17193e00 Expand file name for remote dirs as well
7a12ab5ea2 Fix project.el commands in "transient" projects
274ec97e3c Make sure alist-related functions say so in their doc
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/project.el | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 1f4cbe96ad8..f5f4092babf 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -185,23 +185,25 @@ to find the list of ignores for each directory." | |||
| 185 | (require 'find-dired) | 185 | (require 'find-dired) |
| 186 | (require 'xref) | 186 | (require 'xref) |
| 187 | (defvar find-name-arg) | 187 | (defvar find-name-arg) |
| 188 | (let ((default-directory dir) | 188 | (let* ((default-directory dir) |
| 189 | (command (format "%s %s %s -type f %s -print0" | 189 | ;; Make sure ~/ etc. in local directory name is |
| 190 | find-program | 190 | ;; expanded and not left for the shell command |
| 191 | (file-local-name dir) | 191 | ;; to interpret. |
| 192 | (xref--find-ignores-arguments | 192 | (localdir (file-local-name (expand-file-name dir))) |
| 193 | ignores | 193 | (command (format "%s %s %s -type f %s -print0" |
| 194 | (expand-file-name dir)) | 194 | find-program |
| 195 | (if files | 195 | localdir |
| 196 | (concat (shell-quote-argument "(") | 196 | (xref--find-ignores-arguments ignores localdir) |
| 197 | " " find-name-arg " " | 197 | (if files |
| 198 | (mapconcat | 198 | (concat (shell-quote-argument "(") |
| 199 | #'shell-quote-argument | 199 | " " find-name-arg " " |
| 200 | (split-string files) | 200 | (mapconcat |
| 201 | (concat " -o " find-name-arg " ")) | 201 | #'shell-quote-argument |
| 202 | " " | 202 | (split-string files) |
| 203 | (shell-quote-argument ")"))"") | 203 | (concat " -o " find-name-arg " ")) |
| 204 | ))) | 204 | " " |
| 205 | (shell-quote-argument ")"))"") | ||
| 206 | ))) | ||
| 205 | (project--remote-file-names | 207 | (project--remote-file-names |
| 206 | (sort (split-string (shell-command-to-string command) "\0" t) | 208 | (sort (split-string (shell-command-to-string command) "\0" t) |
| 207 | #'string<)))) | 209 | #'string<)))) |