Is there a way to have predefined helm-occur searches so that I can then bind them to a key?
I have some frequently and hard-to-type searches that would benefit from this.
(I used to do this easily with
helm-swoop but it seems to be abandoned)
Not sure how
helm-swoop worked, but you can do this:
(defun call-helm-occur (query) "Passes QUERY to helm-occur using `isearch-string'." (let ((isearch-string query)) (call-interactively 'helm-occur-from-isearch)))
helm-occur-from-isearch pulls its input from the variable
isearch-string, so use
let binding to set this variable.