From 967dc8a329804a7b3517a34a4b6c35f11ed9edc4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 21 Apr 2017 20:35:24 +0200 Subject: Emacs: Use one projects directory --- emacs/.emacs.d/init.org | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 43a861df..e7cbedc7 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -430,14 +430,13 @@ configuration with crux.el * Projects #+BEGIN_SRC emacs-lisp -(defvar work-project-directory "~/work") -(defvar home-project-directory "~/projects") +(defvar projects-root-directory "~/projects") #+END_SRC #+BEGIN_SRC emacs-lisp (defun switch-to-dotfiles () (interactive) - (projectile-switch-project-by-name (expand-file-name "~/dotfiles"))) + (projectile-switch-project-by-name (expand-file-name "~/projects/git.alanpearce.uk/alan/dotfiles/"))) #+END_SRC ** The Silver Searcher @@ -515,13 +514,9 @@ based upon some folder conventions I use. (projectile-with-default-dir (projectile-project-root) (cmd-to-echo "yarn" (concat "run " cmd)))) - (defun ap/open-work-project (&optional arg) + (defun ap/open-project (&optional arg) (interactive "P") - (ap/open-subfolder-project work-project-directory arg)) - - (defun ap/open-home-project (&optional arg) - (interactive "P") - (ap/open-subfolder-project home-project-directory arg)) + (ap/open-subfolder-project projects-root-directory arg)) (setq projectile-switch-project-action #'projectile-commander projectile-completion-system 'ivy))) -- cgit 1.4.1