[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: |
x_emacs-windows_x |
Subject: |
Re: [h-e-w] How to full pathname in modeline |
Date: |
Tue, 10 Feb 2009 23:00:39 +0000 |
User-agent: |
Mutt/1.5.9i |
On Sun, Feb 01, 2009 at 01:33:54PM -0500, address@hidden wrote:
> I prefer to show it in the title bar:
>
> ;; format title bar to show full path of current file
> (setq-default frame-title-format
> (list '((buffer-file-name " %f"
> (dired-directory
> dired-directory
> (revert-buffer-function " %b"
> ("%b - Dir: " default-directory)))))))
On Mon, Feb 02, 2009 at 07:59:56AM -0700, Sarir Khamsi wrote:
> I generally dislike responses that don't answer the question, but
> might I suggest using the frame title instead:
>
> (setq frame-title-format
> '((buffer-file-name "%f" (dired-directory dired-directory "%b")) " - "
> invocation-name "@" system-name))
Hi, and belated thanks for the replies to my question. I agree with
both that it's nicer to have the filename in the title bar.
Both the above solutions work for me but they obviously differ in a
few ways which I am curious to understand. The problem is I've not
yet attempted any elisp and so it's all still a bit cryptic.
Is there any relevance in the use of setq-default vs. setq?
The first solution uses (revert-buffer-function ...), and the manual
for revert-buffer-function seems to imply some relationship to dired
mode. I couldn't see any difference between the two solutions in
dired mode. What does this construct do?
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"))))
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.