branch: elpa/projectile
commit 6d1604aa1160c28e35c384b17e62e8f72e95d24b
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
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)
---
CHANGELOG.md | 2 ++
projectile.el | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index efddfbc826..6b0cbd42d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@
### Bugs fixed
+* [#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).
+* [#1841](https://github.com/bbatsov/projectile/issues/1841): Preserve user's
`compilation-buffer-name-function` when
`projectile-per-project-compilation-buffer` is nil.
* [#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.
* [#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`.
* [#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.
diff --git a/projectile.el b/projectile.el
index 5791b51b17..fe253f3a2c 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3182,7 +3182,7 @@ otherwise expand NAME-PATTERN in DIR ignoring wildcards."
(let ((expanded (expand-file-name name-pattern dir)))
(or (if (string-match-p "[[*?]" name-pattern)
(car
- (file-expand-wildcards expanded)))
+ (ignore-errors (file-expand-wildcards expanded))))
expanded)))
(defun projectile-cabal-project-p (&optional dir)
@@ -5469,8 +5469,8 @@ The command actually run is returned."
(command (projectile-maybe-read-command show-prompt
command
prompt-prefix))
- compilation-buffer-name-function
- compilation-save-buffers-predicate)
+ (compilation-buffer-name-function compilation-buffer-name-function)
+ (compilation-save-buffers-predicate
compilation-save-buffers-predicate))
(when command-map
(puthash default-directory command command-map)
(let ((hist (projectile--get-command-history project-root)))