Some people had the same issue:

I've tried to change frame-title-format value to:

  • (setq frame-title-format '(multiple-frames "%b" ("" invocation-name "@" "foobar")))
  • (setq frame-title-format "%b")

Both works for several seconds then changed to default invocation-name "@" system-name after switching to several other windows.

This happened only when emacs in non-active window state: when it becomes an inactive window, it uses the default value, but when it becomes active window it uses 'user' frame-title value.

I use I3 Window Manager with stacking layout, so I know exactly when the title reverts back to default inconsistently.

I tried using emacs -q, yes the problem disappear. But Anyone knows the solution?

The horrible trick that I can use is setting system-name to fake name (setq system-name "foo"), but I'm sure this will create problem in future. Other trick is using (set-frame-name "Foobar") but it didn't update even I use (set-frame-name (concat invocation-name " - " (buffer-name)))

I don't want my username/machinename in the application title.

  • 1
    I think you would need to file a bug report or just set the frame name explicitly using the frame-parameter. I've been setting the frame name parameter for more than 5 years and have yet to see any frame name change inadvertently ... – lawlist Jun 27 '19 at 5:55
  • 2
    If you don't see the problem when you use that code after starting Emacs with emacs -Q (you mentioned emacs -q, which is slightly different), then bisect your init file to find the culprit. You are likely inflicting this problem on yourself (inadvertently). – Drew Jun 27 '19 at 14:37

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.