It seems by default this can't be done. For example, if I try to activate
helm-mini, and then from there activate
helm-M-x, I get the error message:
Error: Trying to run helm within a running helm session. Is there a good way around this constraint when writing a custom function?
My use case is this: I am trying to write my own function that will try to call
helm-mini, but if helm is already running (i.e., if
helm-alive-p evaluates to
t) it will run
helm-projectile-find-file instead. What I have so far is:
(defun es/helm-mini-or-projectile-find-file () (interactive) (if (not (helm-alive-p)) (helm-mini) (progn (helm-keyboard-quit) (helm-projectile-find-file))))
I am trying to kill helm if it is running before calling
helm-projectile-find-file, because, as mentioned above, I can't run a helm command if I am already in the middle of another helm command. However, it seems like
helm-keyboard-quit breaks out of the function before
helm-projectile-find-file is executed. Or perhaps there is something else wrong with my code. I am still not very proficient at all with emacs lisp. Is there a good way to get around the constraint of no helm commands during a running helm session?