rms@mit-prep (10/10/85)
From: Richard M. Stallman <rms@mit-prep> Date: Wed, 9 Oct 85 19:00:12 edt From: Sathya D.Narayanan <ads@mit-hermes> 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