Skip to content

Commit 6d1604a

Browse files
committed
Fix wildcard expansion in unreadable dirs and compilation-buffer-name-function
- Wrap file-expand-wildcards in ignore-errors so project root detection works when parent directories are not readable, e.g. on iCloud Drive or Termux (#1816) - Preserve the user's compilation-buffer-name-function instead of unconditionally binding it to nil in projectile--run-project-cmd, so custom buffer naming works when projectile-per-project-compilation-buffer is nil (#1841)
1 parent a28bf9c commit 6d1604a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Bugs fixed
1010

11+
* [#1816](https://github.com/bbatsov/projectile/issues/1816): Fix `projectile-expand-file-name-wildcard` failing when a parent directory is not readable (e.g. iCloud Drive, Termux).
12+
* [#1841](https://github.com/bbatsov/projectile/issues/1841): Preserve user's `compilation-buffer-name-function` when `projectile-per-project-compilation-buffer` is nil.
1113
* [#1823](https://github.com/bbatsov/projectile/issues/1823): Update the mode-line via `window-configuration-change-hook` so non-file buffers (e.g. Magit) display the correct project info.
1214
* [#1886](https://github.com/bbatsov/projectile/issues/1886): Fix `(wrong-type-argument stringp nil)` error when running project commands in a newly created project by using `projectile-acquire-root` instead of `projectile-project-root` in `projectile--run-project-cmd`.
1315
* [#1456](https://github.com/bbatsov/projectile/issues/1456): Fix `projectile-replace-regexp` stopping when encountering a missing file by filtering nonexistent files from the replacement file list.

projectile.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3182,7 +3182,7 @@ otherwise expand NAME-PATTERN in DIR ignoring wildcards."
31823182
(let ((expanded (expand-file-name name-pattern dir)))
31833183
(or (if (string-match-p "[[*?]" name-pattern)
31843184
(car
3185-
(file-expand-wildcards expanded)))
3185+
(ignore-errors (file-expand-wildcards expanded))))
31863186
expanded)))
31873187

31883188
(defun projectile-cabal-project-p (&optional dir)
@@ -5469,8 +5469,8 @@ The command actually run is returned."
54695469
(command (projectile-maybe-read-command show-prompt
54705470
command
54715471
prompt-prefix))
5472-
compilation-buffer-name-function
5473-
compilation-save-buffers-predicate)
5472+
(compilation-buffer-name-function compilation-buffer-name-function)
5473+
(compilation-save-buffers-predicate compilation-save-buffers-predicate))
54745474
(when command-map
54755475
(puthash default-directory command command-map)
54765476
(let ((hist (projectile--get-command-history project-root)))

0 commit comments

Comments
 (0)