I want to hide all Dired buffers as major mode in Ibuffer.
(add-to-list 'ibuffer-never-show-predicates "magit*")
ibuffer-never-show-predicates accepts a regexp and a function.
How can I hide all Dired buffers in Ibuffer?
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
Yes, you can write a predicate function for that:
(defun my-dired-mode-buffer-p (buf) "Non-nil if buffer BUF is in `dired-mode'." (with-current-buffer buf (derived-mode-p 'dired-mode))) (with-eval-after-load "ibuffer" (add-to-list 'ibuffer-never-show-predicates #'my-dired-mode-buffer-p))