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

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

Re: tilde in dired default-directory but not elsewhere


From: Emanuel Berg
Subject: Re: tilde in dired default-directory but not elsewhere
Date: Wed, 09 Jul 2014 19:43:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> I think you should use `abbreviate-file-name` in your
> mode-line expression.

Yes, this works:

(setq-default mode-line-format
              '(:eval (abbreviate-file-name (buffer-file-name))))

Now it will be interesting to see how much work is
required to make it work the right way for dired and
sudo buffers, not to mention all the "file-less"
modes...

On the bright side, `abbreviate-file-name' I can
probably also use to clean up the code I just posted,
that of killing the path!
              
-- 
underground experts united


reply via email to

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