Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!think!mit-eddie!rms@mit-prep From: rms@mit-prep Newsgroups: net.emacs Subject: Fix to the fix to rmail Message-ID: <52@mit-eddie.UUCP> Date: Thu, 10-Oct-85 02:59:35 EDT Article-I.D.: mit-eddi.52 Posted: Thu Oct 10 02:59:35 1985 Date-Received: Sat, 12-Oct-85 06:12:06 EDT Sender: daemon@mit-eddi.UUCP Organization: MIT, Cambridge, MA Lines: 47 From: Richard M. Stallman Date: Wed, 9 Oct 85 19:00:12 edt From: Sathya D.Narayanan To: rms@prep Subject: Your bug fix to rmail caused another bug. The following function need the extra lines to make various other parts of rmail work. The lines are indicated, maybe a better solution can be found. It was just that after all the inbox mail was added the function did not return the dot to the correct spot hence ^L\n0,,\n wasn't getting added. Hence new mail got incd into the RMAIL file but never could be seen by the user. The luser has to use M-x widen to see and remove the mail which has already been added. He should move it ot mbox and invoke rmail again. ----------------------------------------------------------------------- (defun rmail-insert-inbox-text (files) (let (file tofile delete-files odot) ! (goto-char (dot-max)) ! (skip-chars-backward " \t\n") ! (delete-region (dot) (dot-max)) ! (setq odot (dot-max)) (while files (setq file (substitute-in-file-name (car files)) tofile (concat file "~")) (if (and (not (file-exists-p tofile)) (file-exists-p file)) (progn (if (equal (file-name-directory file) rmail-spool-directory) (progn (setq tofile (expand-file-name "~/.newmail")) (call-process (expand-file-name "movemail" exec-directory) nil nil nil file tofile)) (rename-file file tofile t)))) (if (file-exists-p tofile) (progn (goto-char (dot-max)) (insert-file-contents tofile) (goto-char (dot-max)) (or (= (preceding-char) ?\n) (insert ?\n)) (setq delete-files (cons tofile delete-files)))) (setq files (cdr files))) ! (goto-char odot) delete-files)) ---------------------------------------------------------------------------- -Sathya