Trying again. This is Debian 27.1 with the following libraries taken from trunk as of 11 February (unchanged as of today): rmail rmailedit rmailmm rmailout rmailsum And the attached files used for testing: /tmp/RMAILbug /tmp/bug.el emacs -Q -nw M-x load-library RET /tmp/bug.el RET C-u M-x rmail RET /tmp/RMAILbug RET <-- looking at message #3 C-d <-- looking at message #2 o /tmp/a RET <-- looking at message #3 After the last command I should get a message saying that no more undeleted messages are there, and be looking at message #2, however I get no message and I am looking a message #3.