We Recommend

Learning Python Learning Python
The authors of Learning Python show you enough essentials of the Python scripting language to enable you to begin solving problems right away, then reveal more powerful aspects of the language one at a time. This approach is sure to appeal to programmers and system administrators who have urgent problems and a preference for learning by semi-guided experimentation.


Posted By

coldpeer on 05/11/08


Tagged

file buffer name emacs titlebar frame-title-format


Versions (?)


Titlebar customization, file name displaying


Published in: Emacs Lisp 


URL: http://coldpeer.jogger.pl/2007/12/01/emacs-konfiguracja-belki-z-tytulem/

By default, Emacs displays on the titlebar (I mean GUI Emacs) emacs@domain. There is a way to modify this, using (setq frame-title-format "my title").

How to display emacs@domain: ~/dir/file (or buffer name in case of e.i. *scratch*)? Add it to your .emacs:


  1. (add-hook 'window-configuration-change-hook
  2. (lambda ()
  3. (setq frame-title-format
  4. (concat
  5. invocation-name "@" system-name ": "
  6. (replace-regexp-in-string
  7. (concat "/home/" user-login-name) "~"
  8. (or buffer-file-name "%b"))))))

Report this snippet 

You need to login to post a comment.