Unfortunately even "the name of the machine" can change; e.g., I can invoke the shell command "hostname garfield" to change my machine's name to garfield. Also, I expect that if Emacs has its process migrated (LinuxPMI, anybody?) it will then be running on a different machine with a different name. How about the attached patch? The idea is that (system-name) actually inquires for the current system name, and system-name caches the result. If an Emacs lisp program assigns to system-name, though, it's no longer updated thereafter.