Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Emacs and I find quite annoying the default frame (aka window) title that is user@host especially when I have several frames opened. Searching around I found that it's possible to change that by editing the variable frame-title-format; so I did it, I changed it to "%b" (for example) and that worked.

Now the issue: after exactly 30 seconds I minimized the frame the title switches back to user@host until I focus again on the frame.

I tried to write in my ~/.emacs:

(setq frame-title-format "%b")

and I even tried to customize it:

(custom-set-variables
 ; [...]
 '(frame-title-format "%b")
)

with no luck.

DETAILS:

  • GNU Emacs 23.2.1

  • Debian Squeeze

  • Openbox

Am I missing something?

share|improve this question
1  
What version of Emacs are you using, under what operating system? Can you reproduce this behavior with a .emacs that only contains (setq frame-title-format "%b")? –  Gilles Oct 17 '10 at 19:45
    
Edited. Yes, it's the same with a ~/.emacs that only contains (setq frame-title-format "%b"). –  cYrus Oct 17 '10 at 20:04
    
Do you have a way to reproduce the problem, or does it happen randomly “after a while”? What is your window manager or desktop environment (not that I think it should matter)? (By the way, yes, it should work the way you think, and it does for me with Emacs 23.1.1 on Ubuntu.) –  Gilles Oct 17 '10 at 21:22
    
Surprisingly, "after a while" = 30 seconds. –  cYrus Oct 17 '10 at 21:46
add comment

2 Answers

up vote 2 down vote accepted

I have this in my .emacs:

(setq frame-title-format "%b")
(setq icon-title-format "%b")

And it works for me (GNU Emacs 23.1.1).

If it continues to not work for you, try running a plain-vanilla emacs session (emacs -q --no-site-init), then add the above two lines and then try it. If it works then something in your .emacs file (or the site-wide .emacs file) is in conflict.

share|improve this answer
    
Yes, thank you, that worked! For some reason after a while icon-title-format is used rather than frame-title-format; setting both to the same value solved my problem. –  cYrus Oct 20 '10 at 15:09
add comment
(modify-frame-parameters (selected-frame) (list (cons 'name "The New Title")))

does the trick for me.

share|improve this answer
    
Yes thanks, it does the trick but this way I cannot have the same behavior of "%b": shows the current buffer. –  cYrus Oct 17 '10 at 20:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.