This is a hint for the more hardcore hackers (read "geeks") in the audience! Previous hints talk about setting the Terminal's title bar in Terminal to, for example, display your currrent directory path. Nice ... but for me this had one little problem: I run the emacs editor in the Terminal. This allows me to edit files in multiple directories, which basically means that the path showing in my title bar often displays incorrect information (the path where I started emacs vs. the path to the file I'm editing). Unfortunately, there was no good way to have emacs change the Terminal's title bar.
Well (you guessed it), now there is! I prefer to describe the process in a stepwise fashion; read the rest of the hint for the steps...
(load "[PATH-TO-FILES]/xterm-frobs")
(load "[PATH-TO-FILES]/xterm-title")
You must load xterm-frobs first! But wait...(defun format-mode-line (dummy)
(concat
(if buffer-read-only " %% "
t (if (buffer-modified-p) " ** "))
"Emacs" " - " (buffer-name)) )
Note that the dummy argument does nothing. It simply acts as a placeholder for the required argument being passed from the xterm-window functions. The if statement also prints a ** when your buffer is modified, and a %% when it's read-only (standard emacs practice). (when (and (not window-system)
(string-match "^xterm" (getenv "TERM")))
(require 'xterm-title)
(xterm-title-mode 1))
Mac OS X Hints
http://hints.macworld.com/article.php?story=20041008195252133