Do you dislike the buffer names Emacs generates when two files have the same name? e.g. "
myfile.txt" and "
A package 'uniquify' changes the default naming of buffers to include parts of the file name (directory names) until the buffer names are unique.
For instance, buffers visiting the files:
would be named
respectively (instead of "
Makefile" and "
There are other naming schemes possible.
I use this to my .emacs:
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "/")
(setq uniquify-after-kill-buffer-p t) ; rename after killing uniquified
(setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers
For the *info* page,
C-h i m emacs RET s uniquify RET