[OS X Emacs] mail-default-headers - where does it belong?

Skip Montanaro skip at pobox.com
Thu Oct 29 15:05:03 EDT 2009

In my ~/.emacs file I have this setting:

    (setq mail-default-headers "From: skip at pobox.com\n")

I just switched from 1.9 or 2.0p1 to 2.0p3 and find that my From: header
is no longer set properly.   It is:

    From: Skip Montanaro <skip at montanaro.dyndns.org>

(probably the default).  No wonder my mail hasn't been going out.
Looking at my outgoing mail archive it would appear that it's also not
picking up my mail-mode-hook:

    ;;define mail-archive-file-name to ~/mail/archive/yyyy-mm
    (require 'timezone)
    (defun archive-file-name ()
      (let ((date (timezone-parse-date (current-time-string))))
        (concat vm-folder-directory
                (aref date 0)
                (format "%02d" (string-to-number
                                (aref date 1))))))

    (setq mail-mode-hook
            (lambda ()
              (setq mail-archive-file-name (archive-file-name))

because mail messages I originate (as opposed to replies to other
messages) haven't been archived.

It appears that 1.9 (which I was continuing to use for -nw support) does
read ~/.emacs.  Also, I had been running 2.0p1 on my desktop with no
problem.   I'm not sitting in front of my laptop at the moment so I
can't tell for sure if 2.0p3 in GUI mode does the right thing.

Did something change between 2.0p1 and 2.0p3 (or between 1.9 and 2.0p3)
regarding ~/.emacs file loading?  If so, is this GNU Emacs-specific or


Skip Montanaro - skip at pobox.com - http://www.smontanaro.net/

More information about the MacOSX-Emacs mailing list