From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B0B9D1F569 for ; Tue, 3 Oct 2023 06:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696315433; bh=iJelLzwt/ke4Y61lYe7csGW9TSwcWrRd9EHk6W3ZB3A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JqxZpjdZ5p7313QY6pfIxly3TRVqz7zcc6YjLIKFLfRSdbyUc5sA6S29/NgLro6cj uXfEUAVZSq+cPQb02NBF+KM2ONkbgzxT67ldAWpRk/WCEKZdSk56Y4/i5UjcGHefin dRtJ2iWU3rWHgazbeRpDBwmPS/NX2N6gxOH0onfY= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/8] net_reader: process title reflects NNTP article Date: Tue, 3 Oct 2023 06:43:50 +0000 Message-ID: <20231003064352.2902298-7-e@80x24.org> In-Reply-To: <20231003064352.2902298-1-e@80x24.org> References: <20231003064352.2902298-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This matches the IMAP behavior with UIDs. While we're in the area, cut down on LoC a bit and reduce the scope of the $art variable. --- lib/PublicInbox/NetReader.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm index 2d6cb0d6..76fd3892 100644 --- a/lib/PublicInbox/NetReader.pm +++ b/lib/PublicInbox/NetReader.pm @@ -788,14 +788,12 @@ sub _nntp_fetch_all ($$$) { $beg = $num_a if defined($num_a) && $num_a > $beg && $num_a <= $end; $end = $num_b if defined($num_b) && $num_b >= $beg && $num_b < $end; $end = $beg if defined($num_a) && !defined($num_b); - my ($err, $art, $last_art, $kw); # kw stays undef, no keywords in NNTP - unless ($self->{quiet}) { - warn "# $uri fetching ARTICLE $beg..$end\n"; - } + my ($err, $last_art, $kw); # kw stays undef, no keywords in NNTP + warn "# $uri fetching ARTICLE $beg..$end\n" if !$self->{quiet}; my $n = $self->{max_batch}; - for ($beg..$end) { + for my $art ($beg..$end) { last if $self->{quit}; - $art = $_; + local $0 = "#$art $group $sec"; if (--$n < 0) { run_commit_cb($self); $itrk->update_last(0, $last_art) if $itrk;