file path in buffer name

View: New views
1 Messages — Rating Filter:   Alert me  

file path in buffer name

by matlantis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi emacs friends,

i have to edit multiple files with the same file name (CMakeLists.txt) and since emacs gives the buffer the name of the file and adding a number to it, it is very hard to decide with buffer has which file.

So what i need is a method to say emacs to make the buffer name looking like "CMakeLists.txt in <path>". Even better would be if <path> could be abbreviated to 30 characters, but thats not important.

I have no experience in elisp programming, please can anybody explain to me, what to put in my .emacs file to give emacs the desired behavior?

best regards and thanks for help

Martin