}
for (; !defined($cur) && $head != $tail; $head++) {
my $smsg = PublicInbox::SearchMsg->get($head, $db, $ctx->{mid});
}
for (; !defined($cur) && $head != $tail; $head++) {
my $smsg = PublicInbox::SearchMsg->get($head, $db, $ctx->{mid});
my $mref = $ctx->{-inbox}->msg_by_smsg($smsg) or next;
$cur = Email::Simple->new($mref);
$cur = msg_str($ctx, $cur);
my $mref = $ctx->{-inbox}->msg_by_smsg($smsg) or next;
$cur = Email::Simple->new($mref);
$cur = msg_str($ctx, $cur);
for (; !defined($first) && $head != $tail; $head++) {
my @args = ($head, $db, $mid);
my $smsg = PublicInbox::SearchMsg->get(@args);
for (; !defined($first) && $head != $tail; $head++) {
my @args = ($head, $db, $mid);
my $smsg = PublicInbox::SearchMsg->get(@args);