Based on this answer, and its with-initial-minibuffer
function, I am trying to call helm-projectile-grep
, customizing minibuffer pre-filling.
I try to avoid the default behaviour, which is to pre-fill the minibuffer with the contents of the region (if active) or the thing at point.
If I use
(defun with-initial-minibuffer-projectile-grep (str)
(interactive)
(funcall `(lambda ()
(interactive)
(minibuffer-with-setup-hook
(lambda () (insert (format ": %s " ,str)))
(call-interactively 'helm-projectile-grep)))))
and then I call it with
(with-initial-minibuffer-projectile-grep "mytext")
things go wrong. Any idea of where to start from ?
:input
slot of thehelm
func,helm-projectile-grep
makes use of it in github.com/bbatsov/projectile/blob/1159110/…, you can try to change code in there.noflet
or similar