I keep a copy of email I send by setting mail-archive-file-name to
"~/mail/outgoing-mail". Every once in a while I open the
outgoing-mail to look at a recent message, then I send another mail
message. The latter message gets appended to the buffer, and not to
the file. I think this is a really bad idea. Messages can get lost this
way. (You can send mail from another emacs that appends to the file)
I finally tracked this behavior to mail-do-fcc, which in fact goes far
out of its way to append the message to 'target-buffer'.
If this function always appended to the file, then the worst that
would happen is that I might have to revert the target buffer.
Can we either 1) take this code out, or 2) make it an option.
-jeff
In mail-lib/sendmail.el we have the following code:
(defun mail-do-fcc (header-end)
(let ...
(save-excursion
...
(while fcc-list
(let ((target-buffer (get-file-buffer (car fcc-list))))
(if target-buffer
;; File is present in a buffer => append to that buffer.
(save-excursion
(set-buffer target-buffer)
(cond ((eq major-mode 'rmail-mode)
(mail-do-fcc-rmail-internal tembuf))
((eq major-mode 'vm-mode)
(mail-do-fcc-vm-internal tembuf))
(t
;; Append to an ordinary buffer as a Unix mail message.
(goto-char (point-max))
(insert-buffer-substring tembuf beg end))))
;; Else append to the file directly.
;; (It's OK if it is an RMAIL or VM file -- the message will be
;; parsed when the file is read in.)
(write-region
(1+ (point-min)) (point-max) (car fcc-list) t)))
(setq fcc-list (cdr fcc-list))))
(kill-buffer tembuf)))