[Top][All Lists]

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

Re: tilde in dired default-directory but not elsewhere

From: Michael Heerdegen
Subject: Re: tilde in dired default-directory but not elsewhere
Date: Tue, 08 Jul 2014 20:27:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Hi Emanuel,

> First start it and do describe-variable
> default-directory. You get the tilde. Then open a file
> with an .el extension which should bring Emacs to
> emacs-lisp-mode. Do the dance again and it says
> /home/user/!
> Do `cd', and you get the tilde in the suggestion - but
> describe it, and you get the explicit path!
> Is this as it should be, and if so, is there a reason?

Due to the doc, it is unspecified, which means both cases are ok.

(Also note that default-directory is a buffer local variable, and you
didn't tell in your recipe in which buffer you looked at the binding)

> Interesting tho it might be, what I really want is the
> tilde in the mode line, always, showing the complete
> path. I have a huge font I suppose so it happens that
> the path overflows the width of the terminal if I get
> deep in the file tree. Besides my eye is trained for ~
> and it looks sort of weird to see the /home/user/
> stuff.

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


reply via email to

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