[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] How to full pathname in modeline
From: |
Jason Rumney |
Subject: |
Re: [h-e-w] How to full pathname in modeline |
Date: |
Wed, 11 Feb 2009 23:24:38 +0800 |
User-agent: |
Thunderbird 2.0.0.19 (Windows/20081209) |
address@hidden wrote:
Is there any relevance in the use of setq-default vs. setq?
In this case, no. I suspect the use of setq-default comes from a cut and
paste of setting mode-line-format, which is a buffer-local variable, so
setq-default is required to set a default value - setq overrides the
value for the current buffer only.
I tried to re-order the second solution as follows, but it just
displays an "@" in the title bar:
(setq frame-title-format
'(invocation-name "@" system-name " - "
(buffer-file-name "%f" (dired-directory dired-directory "%b"))))
The first element in the list is a symbol, which according to the doc
string for mode-line-format (referenced from frame-title-format) causes
the list to be treated as a conditional:
ie at runtime it acts like this:
(if invocation-name
"@"
system-name " - " ...)
To get what you expected, you need to make the first element of the list
a string:
(setq frame-title-format
'("" invocation-name "@" system-name " - " ...))
So far all my emacs tweaks have been made through the customisation
buffers, with a little help from rtfm. Am I right in thinking that
frame-title-format cannot be set via any of the customisation buffers?
Thanks for all your help.
Bernie.