In my ~/.emacs I have the following:
(setq frame-title-format
'("" invocation-name ": "
(:eval (if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
"%b"))))
which sets the frametitle as file currently opened in the buffer.
So if ~/.emacs is opened then the title looks as follows:
emacs:~/.emacs
However after some time the title defaults to usual
emacs@hostname
How to go about fixing this?
emacs -Qand after evaluation of your first code section? What does "after some time" mean? Please measure and add the measured time in your question. (It may be relevant.) The problem does not manifest withemacs -QversionGNU Emacs 25.3.1 (x86_64-unknown-cygwin, GTK+ Version 3.22.20) of 2017-09-11for at least 15 minutes. Thereafter I killed that emacs instance. – Tobias Oct 05 '17 at 15:16emacs -q(this time the small letterq) and evaluating the first lisp section from your question. If this also fixes the problem it is time to bisect your initialization file(s). Otherwise you need to inspect your site-startup files and your x-resources. – Tobias Oct 06 '17 at 02:33