The newly installed Emacs 23 on my Gentoo displays some junk characters in the emacs shell when I use “ls” in it.(some thing like “^[01[03m…”) Really annoying at first but after gooled, I found the solution, just add this in .emacs file:
(add-hook ’shell-mode-hook ‘ansi-color-for-comint-mode-on)
All goes well then and you can see different colors to indicate different kinds of files in emacs shell when you use “ls”. I didn’t see this feature when I were using Emacs 23 on SuSE.