Simultaneous copies of emacs rmail

It is possible to lose mail by using two copies of emacs rmail running simultaneously.

Suppose you are reading mail with emacs#1. This emacs thinks there are 3 messages in the RMAIL file.

Later, you start up emacs#2. It starts with the previous messages 1-3, and adds messages 4-6, your new mail. You then exit emacs#2.

Still later, you return to emacs#1. Now it still thinks you have only 3 messages in your RMAIL file. You tell it to get new messages. It reads in 2 new messages into the buffer, but when it starts to save the new copy of RMAIL, it notices that the file there is not the same as the copy it though was there (with the three messages). It will complain to you at this point and ask you something about discarding your edits. The correct answer is probably counterintuitive here.

The file on disk now has messages 1-6, while your buffer has 1-3, and 7-8. emacs has added messages 7-8 to your RMAIL buffer but not saved it to the RMAIL file. It considers changes to the buffer "edits" (rather than the "edits" done to the file by the other emacs), and is asking you which copy of RMAIL is correct. If you, don't discard your edits, you are telling emacs the current buffer (containing 1-3, 7-8) is correct. Doing this, you will lose messages 4-6. If you, do discard your edits, you are telling emacs to reread the file from disk and start from there. This is the correct answer. Don't worry about losing messages 7-8. emacs still has a copy of them in .newmail-your_userid and does not delete this until the RMAIL buffer with these new messages is successfully saved.


This page last updated March 16, 1995.