1

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)

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.