Article View: gnu.emacs.bug
Article #1536Bug in RMAIL
From: Leonard N. Zubkoff
Date: Wed, 29 Mar 1989 22:50
Date: Wed, 29 Mar 1989 22:50
26 lines
1212 bytes
1212 bytes
On machines where MAIL_USE_FLOCK is true, movemail truncates
/usr/spool/mail/$USER rather than deleting it. Unfortunately,
rmail-insert-inbox-text will append a newline to the RMAIL buffer
whenever the file exists, not only if it is nonempty. This causes
the problem that the G command marks the buffer as modified even
if no mail was found, leading to unnecessary saving of the RMAIL
file. The fix is to replace the lines:
(progn (goto-char (point-max))
(insert-file-contents tofile)
(goto-char (point-max))
(or (= (preceding-char) ?\n)
(insert ?\n))
with:
(progn (goto-char (point-max))
(or (zerop (nth 1 (insert-file-contents tofile)))
(progn
(goto-char (point-max))
(or (= (preceding-char) ?\n)
(insert ?\n))))
in rmail-insert-inbox-text.
Leonard
Technical Details
Message-ID:
<8903292250.AA00278@atlantis>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!LUCID.COM!lnzShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!LUCID.COM!lnz From: lnz@LUCID.COM (Leonard N. Zubkoff) Newsgroups: gnu.emacs.bug Subject: Bug in RMAIL Message-ID: <8903292250.AA00278@atlantis> Date: 29 Mar 89 22:50:58 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 26