help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to set mode line to show full path of current file


From: Ashwin Purohit
Subject: How to set mode line to show full path of current file
Date: Tue, 18 Jan 2011 11:05:10 -0800

Hi all,

I'd like to set the mode line to show the full path of the current file, but only to _replace_ the filename with the fullpath, instead of wiping the entire mode line and replacing it by just the filepath. There are other things, like line position and time that I would like to keep on the mode line.

What I'm currently using:
;; set mode line to show full path of current file                                                                                                                                                                                                                            
(setq-default mode-line-format
   (list '((buffer-file-name " %f"
              (dired-directory
               dired-directory
                (revert-buffer-function " %b"
               ("%b - Dir:  " default-directory)))))))

Thanks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]