diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-01 16:51:30 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-01 16:51:30 +0100 |
commit | 3472b9780f8eef4d75532035deb1af595dad9c09 (patch) | |
tree | d417e5d2e26d757e44b0f6a9a0660f4c112d973a /.config | |
parent | a0c9f40e72fee6aaa8f34a6d24ca5edce75f180b (diff) |
emacs: Minor project.el tweaks
Diffstat (limited to '.config')
-rw-r--r-- | .config/emacs/modules/mm-projects.el | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/.config/emacs/modules/mm-projects.el b/.config/emacs/modules/mm-projects.el index 5dd3c6a..0741855 100644 --- a/.config/emacs/modules/mm-projects.el +++ b/.config/emacs/modules/mm-projects.el @@ -14,18 +14,24 @@ This is intended to be called interactively via (use-package project :custom - (project-switch-commands '((project-dired "Dired" ?d) - (project-find-file "Find File") - (project-find-regexp "Find Regexp") - (mm-projects-project-magit-status "Git Status" ?s))) + (project-switch-commands + '((project-dired "Dired" ?d) + (project-find-file "Find File" ?f) + (mm-projects-project-magit-status "Git Status" ?s))) :config (unless mm-darwin-p - (if-let ((repo-directory (getenv "REPODIR"))) - (mm-with-suppressed-output - (thread-last - (directory-files repo-directory :full "\\`[^.]") - (mapcar (lambda (path) (concat path "/"))) ; Avoid duplicate entries - (mapc #'project-remember-projects-under))) + (if-let ((repo-directory (getenv "REPODIR")) + (directories + (cl-loop + for author in (directory-files repo-directory :full "\\`[^.]") + append (cl-loop + for path in (directory-files author :full "\\`[^.]") + collect (list (concat path "/")))))) + (progn + (with-temp-buffer + (prin1 directories (current-buffer)) + (write-file project-list-file)) + (project--read-project-list)) (warn "The REPODIR environment variable is not set.")))) |