[Emacs] Fix custom helm-projectile actions
This commit is contained in:
parent
f1fb2ea08b
commit
64c0e3a930
@ -1816,21 +1816,18 @@ I use helm for almost all emacs completion
|
|||||||
("M-t" . imalison:helm-term-projectile))
|
("M-t" . imalison:helm-term-projectile))
|
||||||
:preface
|
:preface
|
||||||
(progn
|
(progn
|
||||||
|
(defmacro imalison:do-in-project (project-dir &rest forms)
|
||||||
|
`(noflet ((projectile-project-root (&rest args) ,project-dir))
|
||||||
|
,@forms))
|
||||||
(defun imalison:invalidate-cache-and-open-file (_dir)
|
(defun imalison:invalidate-cache-and-open-file (_dir)
|
||||||
(projectile-invalidate-cache nil)
|
(projectile-invalidate-cache nil)
|
||||||
(projectile-find-file))
|
(projectile-find-file))
|
||||||
|
|
||||||
(defun imalison:switch-to-project-and-search (dir)
|
(defun imalison:switch-to-project-and-search (dir)
|
||||||
(let ((default-directory dir)
|
(imalison:do-in-project dir (helm-projectile-ag)))
|
||||||
(projectile-require-project-root nil)
|
|
||||||
(helm-action-buffer "this-buffer-should-not-exist"))
|
|
||||||
(helm-projectile-ag)))
|
|
||||||
|
|
||||||
(defun imalison:helm-term-projectile (dir)
|
(defun imalison:helm-term-projectile (dir)
|
||||||
(let ((default-directory dir)
|
(imalison:do-in-project dir (term-projectile-forward))))
|
||||||
(projectile-require-project-root nil)
|
|
||||||
(helm-action-buffer "this-buffer-should-not-exist"))
|
|
||||||
(term-projectile-forward))))
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(helm-delete-action-from-source "Search in Project"
|
(helm-delete-action-from-source "Search in Project"
|
||||||
|
Loading…
Reference in New Issue
Block a user