0

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?

  • Your last sentence is cut in the middle!? – Stefan Oct 5 '17 at 3:39
  • i have fixed it now. – Sandeep Oct 5 '17 at 13:43
  • 1
    Does this happen with emacs -Q and 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 with emacs -Q version GNU Emacs 25.3.1 (x86_64-unknown-cygwin, GTK+ Version 3.22.20) of 2017-09-11 for at least 15 minutes. Thereafter I killed that emacs instance. – Tobias Oct 5 '17 at 15:16
  • -Q option seems to fix this. But -Q also avoids the customization in .emacs. When I turn back on the all the customization then the problem shows up again. – Sandeep Oct 5 '17 at 16:42
  • Retry with emacs -q (this time the small letter q) 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 6 '17 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.