By default, dired creates new buffers when visiting new directories. Sometimes this is desired, especially when you need to visualize the contents of two separate directories; however, when you’re just navigating around, all the extra buffers tend to clutter your buffer list.
Typical navigation is done with
dired-find-file (bound to
dired-find-file-other-window (bound to
o). When performed on a directory, this visits the directory in a new dired buffer. In Emacs 22, instead try running
dired-find-alternate-file (bound to
a). This replaces the current buffer keeping the clutter of dired buffers to a minimum.
When you run
dired-find-alternate-file for the first time, you’ll receive a warning that the function is disabled. You can either follow the built-in instructions and customizations to enable the function, or you can add the following to your
(put 'dired-find-alternate-file 'disabled nil)
GNU Emacs Manual, Visiting Files in Dired
EmacsWiki, DiredReuseDirectoryBuffer — includes other ways to enable similar behavior in Emacs 21.