fix hgh/update-projects

This commit is contained in:
hgranthorner
2026-07-23 14:42:44 -04:00
parent 7ee4c1b5ff
commit 7d552bf7af
3 changed files with 82 additions and 17 deletions

View File

@@ -20,7 +20,14 @@
(defun hgh/update-projects ()
(interactive)
(dolist (path '("/programming/projects/" "/programming/thirdparty/" "/programming/probe/"))
(dolist (path '("/programming/projects/"
"/programming/projects/worktrees"
"/programming/thirdparty/"
"/programming/probe/"))
(let ((projects-root (concat (getenv "HOME") path)))
(make-directory projects-root t)
(dolist (dir (directory-files projects-root t "^[^.]"))
(project-current t dir)))))
(when (file-directory-p dir)
(let ((pr (project--find-in-directory dir)))
(when pr (project-remember-project pr)))))))
(message "Project list updated."))