From bb870a9ef6c66aa409d3287d5989fe1ca972218f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 28 Jun 2015 22:31:41 -0700 Subject: [PATCH] Add search in project using ag action to helm-projectile-switch-project. --- dotfiles/emacs.d/init.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index f8255a9c..b7af6b72 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1391,10 +1391,22 @@ window is active in the perspective." (progn (use-package persp-projectile :ensure t - :commands projectile-persp-switch-project) - (use-package helm-projectile + :commands projectile-persp-switch-project))) + +(use-package helm-projectile :ensure t - :commands (helm-projectile-on)))) + :commands (helm-projectile-on) + :config + (progn + (helm-delete-action-from-source "Search in Project" helm-source-projectile-projects) + (defun imalison:switch-to-project-and-search (dir) + (let ((default-directory dir) + (projectile-require-project-root nil) + (helm-action-buffer "this-buffer-should-not-exist")) + (helm-projectile-ag))) + (helm-add-action-to-source "Search in Project" + 'imalison:switch-to-project-and-search + helm-source-projectile-projects))) (use-package smex :ensure t