Ian van der Neut writes: [...] > In normal mode (just starting 'emacs filename' from the command line, rather > than emacsclient) it doesn't show the project name until I open a new frame, > then both frames get the right frame title. If Emacs is started as `emacs --daemon`, there would be no frame while executing .emacs. If not started as a daemon, there would be one, but after-make-frame-functions won't be executed for this frame. Therefore I wrote this macro: (require 'cl) (defmacro do-frames (&rest body) (let ((frame (gensym))) `(progn (dolist (,frame (frame-list)) (select-frame ,frame) ,@body) (add-hook 'after-make-frame-functions (lambda (new-frame) (select-frame new-frame) ,@body))))) And (do-frames (what-ever you-like)) would work for all frames, either started as daemon or not. -- Carl Lei (XeCycle) Department of Physics, Shanghai Jiao Tong University OpenPGP public key: 7795E591 Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591