Last active
May 3, 2024 15:13
-
-
Save jamescherti/bf74fb911d17583e7f4b57946f1ea775 to your computer and use it in GitHub Desktop.
Emacs: Switch to another project using (find-file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; Emacs: Switch to another project using (find-file) | |
;; Gits URL: https://gist.github.com/jamescherti/bf74fb911d17583e7f4b57946f1ea775 | |
;; License: MIT | |
;; Author: James Cherti | |
(defun my-project-prompt-project-dir () | |
"Prompt the user for a directory that is one of the known project roots." | |
(project--ensure-read-project-list) | |
(setq pr-dir (completing-read "Select project: " project--list nil t))) | |
(defun my-project-switch-project-find-file (dir) | |
"Switch to another project using (find-file)." | |
(interactive (list (my-project-prompt-project-dir))) | |
(find-file dir)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment