Currently I'm ignore these buffers:

(setf helm-boring-buffer-regexp-list '("\\` " "\\*helm" "\\*helm-mode"
                                       "\\*Echo Area" "\\*Minibuf" "\\*monky-cmd-process\\*"
                                       "\\*epc con" "\\*Compile-Log\\*" "\\*monky-process\\*"
                                       "\\*CEDET CScope\\*" "\\*Messages\\*" "\\*Flycheck error"
                                       "\\*.+(.+)" "elpa/.+" "tramp/.+"
                                       "\\*Gofmt Errors\\*" "\\*autopep8"
                                       "\\*magit-process:" "\\*magit-diff:" "\\*anaconda-mode\\*"))

Ok. I started using Circe for IRC and all that, but it annoys me seeing the buffer of each channel and the buffer of the server in the Helm buffer every time I hit C-x b, I feel that my buffer list is cluttered. I'm on the way of using helm-circe to manage those buffers alone.

So, I was wondering if it where even possible to tell Helm to ignore those buffers that have certain major mode activated, in this particular case, circe-mode.

  • You can't ignore buffer according to its major mode easily, one way that I can image is to advice the function (such as helm-skip-boring-buffers, which is used by helm to help build a buffer list) to skip the major mode as you like. However, according to my little experimentation, the buffer name created by circe is still very specialized (e.g., irc.freenode.net:6697 and #emacs), so it is easy to filter by using their buffer name. – xuchunyang Jul 26 '16 at 6:47

Yes, a regexp that starts with an asterisk filters out by major mode, exactly what you need. So add "\\*circe-mode" to helm-boring-buffer-regexp-list list.

(To convince yourself, you can first try it right in the buffer list, by typing *circe-mode as the pattern and making sure you see only the buffers you want to filter out.)


The buffer names created by Circe look like #emacs and irc.freenode.net:6697 from here, and the following is how to tell helm to ignore them:

(with-eval-after-load 'helm-buffers
  (add-to-list 'helm-boring-buffer-regexp-list "\\`#")
  (add-to-list 'helm-boring-buffer-regexp-list "irc.freenode.net:6697"))

As far as I know, there is no easy way to filter according to major mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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