How do I show the path to a file in Emacs mode?
1 answer
First, you see the name of the buffer, not the name of the file. Try opening two files with the same name (in different directories) and see what I mean.
Secondly, yes, I'm sure it is possible - just configure mode-line-format
.
Third, it might not be such a great idea - the mode line is already quite crowded, and the long way just doesn't fit. I know it sounds great now, but the next day you will hate it.
Instead, put the path in the title bar:
(setq frame-title-format
'(buffer-file-name "%b - %f" ; File buffer
(dired-directory dired-directory ; Dired buffer
(revert-buffer-function "%b" ; Buffer Menu
("%b - Dir: " default-directory))))) ; Plain buffer
+5
source to share