RMAIL max buffer size exceeded

There is a maximum buffer size of 8MB in emacs 19. Should you try to read new mail causing your RMAIL buffer to exceed this limit, you will get the error max buffer size exceeded. My understanding of this situation, having only seen it once, is that everything you try to do at this point, including deleting messages, results in repeating the error message.

Here is the procedure which I believe will get around this situation:

  1. Exit from emacs without saving the RMAIL buffer.
    You can do this because emacs keeps a copy of your new mail on disk (in .newmail) until the RMAIL buffer containing the new messages is successfully saved.
  2. Start up a new emacs without the -f rmail command.
  3. Read your RMAIL file in using the command
    <ESC> x rmail-input <CR> RMAIL <CR>
    
  4. Remove some of the messages in the file (either by moving them to another file, or just deleting them). (You may be interested in the page on reducing the size of your RMAIL file.
  5. Expunge and save your RMAIL buffer (using the "s" command).
The "g" command should now work (first getting the contents of your .newmail, and the next time, any new mail you may have received).
This page last updated April 12, 1995.