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?


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))
  • It works. thank you. – Jay Lee Mar 31 '19 at 5:28
  • 2
    OP: If this answers your question then please consider accepting this answer. That way the question will no longer appear among the unanswered questions. Thx. – Drew Mar 31 '19 at 23:23

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.