I have these settings for dired

(setq-default dired-omit-files-p t)
(setq dired-omit-files (concat dired-omit-files "\\|^\\..+$"))

I was wondering if it is possible to hide/disable the message Omitted N lines.

Whenever I have a Dired buffer opened, the message appears repeatedly. For example: it appears when I am trying to switch to another buffer and when I use smex.

It is just annoying having the minibuffer cluttered with that message when I am trying to do something not strictly related to Dired.

2 Answers 2


You can disable the omit messages by setting dired-omit-verbose variable to nil.

(defcustom dired-omit-verbose t
  "When non-nil, show messages when omitting files.
When nil, don't show messages."
  :version "24.1"
  :type 'boolean
  :group 'dired-x)

- From dired-x.el


In addition to what @kaushalmodi has said, you should not need to work around this annoyance at all.

You should not see that message displayed more than once. And certainly not when you are "trying to do something not strictly related to Dired."

Does that happen also when you start Emacs without your init file (i.e., emacs -Q)?

If not, then recursively bisect your init file to find the culprit code. You can comment out a region of your init file using M-x comment-region (with C-u it uncomments). Do that to 1/2 of the file, then 3/4, 7/8, 15/16, etc. until you've narrowed it down to the culprit. This is quicker than it sounds to do - it's a binary search.

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.