More feedback from +default/discover-projects

Log successes and failures to the echo area/*Messages* so we know the
command worked (or didn't).
This commit is contained in:
Henrik Lissner 2021-01-21 01:48:06 -05:00
parent eacbc5e36f
commit 2e088e7945

View file

@ -45,9 +45,16 @@ If prefix ARG is non-nil, prompt for the search path."
(interactive "P") (interactive "P")
(if arg (if arg
(call-interactively #'projectile-discover-projects-in-directory) (call-interactively #'projectile-discover-projects-in-directory)
(if projectile-project-search-path (if (not projectile-project-search-path)
(mapc #'projectile-discover-projects-in-directory projectile-project-search-path) (user-error "`projectile-project-search-path' is empty; don't know where to search")
(user-error "`projectile-project-search-path' is empty; don't know where to search")))) (letf! (defun projectile-add-known-project (project-root)
(unless (projectile-ignored-project-p project-root)
(funcall projectile-add-known-project project-root)
(message "Added %S to known project roots")))
(dolist (dir projectile-project-search-path)
(if (not (file-accessible-directory-p dir))
(message "%S was inaccessible and couldn't searched")
(projectile-discover-projects-in-directory projectile-project-search-path)))))))
;;;###autoload ;;;###autoload
(defun +default/dired (arg) (defun +default/dired (arg)