I have currently bound C-x C-b to helm-mini. While running helm-mini, I can then type M-a C-s followed by typing in more characters which narrows down the candidates to those buffers that match on those characters. But, that entire C-x C-b M-a C-s key sequence is cumbersome. How do I bind/rebind a shorter key sequence, e.g., M-9, to call whatever that longer keybinding calls?

I am aware of helm-occur but it only searches the current buffer, not multiple buffers, which from what I can gather is only available via the cumbersome C-x C-b M-a C-s sequence.

1 Answer 1


You can write your own function that does this.

(defun helm-occur-all-buffers ()
  "Run `helm-occur' in all buffers."
  (require 'helm-occur)
  (let ((buffers (cl-remove-if (lambda (buffer)
                                 ;; remove internal buffers
                                 (string= (substring (buffer-name buffer) 0 1) " "))
    (helm-multi-occur-1 buffers)))

See also helm-occur-visible-buffers for similar functionality provided by Helm itself.

  • Thank you. I have since moved my configuration completely over to Councel and Ivy to address severe performance issues in Helm that I have yet to see in Councel and Ivy. Thus, my incentive to test out your solution as been negated.
    – bgoodr
    Feb 8, 2022 at 15:50

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.