reddit / emacs

Set x window title from within emacs

NotAKentishMan · 2022-09-23 14:40
I start emacs with the —title option which sets the window title at the top of the window. Can this be done from within emacs? I would like to set it to the current active buffer.
rpluim · 2022-09-23 14:57
The default value should show the current buffer. In case you want to change it: `C-h v frame-title-format` frame-title-format is a variable defined in `src/xdisp.c'. Its value is "%b" Template for displaying the title bar of visible frames. (Assuming the window manager supports this feature.)
NotAKentishMan · 2022-09-23 15:44
Thanks. I tried this and the file name/buffer is correctly show on the lower bar but not the man window at the top. Gnome/Ubuntu.
NotAKentishMan · 2022-09-23 23:31
Thanks, this does indeed work.
kagevf · 2022-10-02 20:54
Does set-frame-name work?
NotAKentishMan · 2022-10-02 22:03
I did not try that, frame-title-format worked.
cradlemann · 2022-10-03 19:24
emacs --name <custom_name>