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)
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
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.