My workflow of using Emacs involve checking of many different projects. They are added and removed pretty frequently. This is very annoying and time consuming at the moment:
projectile-add-known-project
and set a path to a new projecthelm-projectile-switch-project
and select a new projecttreemacs-add-and-display-current-project
Is there a way to automate/simplify/speed it up? Perhaps by using some kind of elisp function? If so, what it may look like?
I have some prior experience of using LISP but I haven't written elisp code before.
Well, you can just simply put what you normally do by hand inside one command. You might wanna change a bit to match your needs perfectly.
(defun add-or-switch-project-dwim (dir)
"Let elisp do a few chores & set my hands free!"
(interactive (list (read-directory-name "Add to known projects: ")))
(projectile-add-known-project dir)
(find-file dir)
(treemacs-add-and-display-current-project))