Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ukma!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!mrspoc.transact.com!kayvan
From: kayvan@mrspoc.transact.com (Kayvan Sylvan)
Newsgroups: gnu.emacs.bug
Subject: Annoying bug in FCC handling in sendmail.el
Message-ID: 
Date: 27 Sep 89 09:01:00 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 33

In Emacs version 18.52 (I don't know if this is fixed in later versions),

If I FCC mail to a new file, the file that is created has a starting
blank line (made because of an inserted newsline before the "From "
line). When I visit such a file with VM, it shows "no messages".

The following small patch to sendmail fixes this problem. We really
should not have a blank line inserted unless the file exists.

		---Kayvan
---
Kayvan Sylvan @ Transact Software, Inc. -*-  Los Altos, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan
Hi ho, hi ho! ... The spice must flow... Hi ho, hi ho!... Off to work we go!

*** sendmail.el~	Wed Sep 27 01:47:16 1989
--- sendmail.el	Wed Sep 27 01:47:16 1989
***************
*** 296,300
  		  (insert-buffer-substring curbuf beg end)))
  	    ;; Else append to the file directly.
! 	    (write-region (point-min) (point-max) (car fcc-list) t)))
  	(setq fcc-list (cdr fcc-list))))
      (kill-buffer tembuf)))

--- 296,302 -----
  		  (insert-buffer-substring curbuf beg end)))
  	    ;; Else append to the file directly.
! 	    (write-region
! 	     (if (file-exists-p (car fcc-list)) (point-min) (1+ (point-min)))
! 	     (point-max) (car fcc-list) t)))
  	(setq fcc-list (cdr fcc-list))))
      (kill-buffer tembuf)))