Subject: Re: bug#46463: 27.1; rmailout glitch

From: Eli Zaretskii <[email-masked]>
Date: Mon, 15 Feb 2021 17:35:14 +0200

> From: Francesco Potortì <[email-masked]>
> Date: Mon, 15 Feb 2021 12:26:09 +0100
> Cc: [email-masked]
> 
> 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.

So the problem is that you don't get the message about no following
undeleted message?  Or is something else the problem?

Regarding the lack of message, I'm not sure this is a bug: since you
set rmail-output-reset-deleted-flag non-nil, Rmail no longer tries to
get to the next undeleted message, it instead gets to the next
message, whether deleted or not.  The doc string of rmail-output says:

  Optional prefix argument COUNT (default 1) says to output that
  many consecutive messages, starting with the current one (ignoring
  deleted messages, unless `rmail-output-reset-deleted-flag' is
  non-nil).         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ^^^^^^^

Why it is a problem for you that Rmail goes to the very next message
in this situation?