From unknown Fri Aug 15 16:18:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45269 <45269@debbugs.gnu.org> To: bug#45269 <45269@debbugs.gnu.org> Subject: Status: Incorrect Gnus summary line number after toggle-thread and limiting Reply-To: bug#45269 <45269@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:18:49 +0000 retitle 45269 Incorrect Gnus summary line number after toggle-thread and li= miting reassign 45269 emacs submitter 45269 Pankaj Jangid severity 45269 normal tag 45269 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 16 08:25:08 2020 Received: (at submit) by debbugs.gnu.org; 16 Dec 2020 13:25:08 +0000 Received: from localhost ([127.0.0.1]:60162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpWnk-0004kD-D7 for submit@debbugs.gnu.org; Wed, 16 Dec 2020 08:25:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:59896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpWnf-0004k0-Fz for submit@debbugs.gnu.org; Wed, 16 Dec 2020 08:25:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpWnf-0007Vi-99 for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 08:25:03 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:56097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpWnc-00076x-Kn for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2020 08:25:03 -0500 Received: by mail-pj1-x102b.google.com with SMTP id lb18so1477075pjb.5 for ; Wed, 16 Dec 2020 05:25:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:mail-followup-to:date:message-id:mime-version; bh=9cxTSzbHatx7/clCLTzM7octbvK8gKxzVGPhOAmKM+E=; b=pGK0QPq0Gt9D1chNQtx+2in2u5/Uk7SIlwbdE2H+YOFdLGnxps3CRNYIAhv63DGQBw ghd2I3spDcKn/TUn9I6lGbXrFqWBS1sjEKigdLoNw0m5r/RHM2jaYoeEXK/OS1H1yYO9 DlHPfI7fASw2LYsPkhOYUO+zW9trQYbPkhR5nnLUdaZmnsmpO5H6B3Ts7DxCA50tLhBB 1vvEmcXQceaOozpLvGvytNj7gyCMXuqYCe8CVvEq7zBxQLQpbxZvSkuM9SBeBlapsQlE 7abozoXUsklaloYiyjM3ctSOOkZjOwiMy5o1qtBqcHUFgXU34KB0ZxwvpgLddwzeIAFA x4ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mail-followup-to:date:message-id :mime-version; bh=9cxTSzbHatx7/clCLTzM7octbvK8gKxzVGPhOAmKM+E=; b=kMJpEqD3pqdosIWoCjXtTs4/qml07bjVrVUKhwmglxGdXoZBMt3BGgszbWraIS7vb6 GF/Ryq5NRkXBqHUOn9XxsBQbNzLDPvc2zcCc0Kfkh5eJM4zkav1P1T94C/gjq1+ZDaWj GtKDqfns+A9WsVEeXvlK9e2Vcs5J++kSfErbDZTURpocIq5D+jN5GOn27LkIO9kHFkPN 8+FElQmEbQvZ5Xse/cVf2B16mjD48U9YoKFmy9A2WOckAJ6vHr5EqbMKYrt45NtMKYz0 ur5HPVY4xo2oZ/T6wElyPurVJz+sETHExLKbQAy1Xbms5Jj1I8TY/wRXxgIYwDzOx79X 5+8A== X-Gm-Message-State: AOAM533dSm/AwASiihtxkzxWta5Mi45+h7N3xRG17jfWa5B0NVeS+mmE VAaWG6IKSfyl/Ob2moUig98nXrCBSXH5lQ== X-Google-Smtp-Source: ABdhPJxhPyvyeZ4PwKg8IM3kW3F2OKhrQt+z6PyBCxBmsWzLnvHxoDiwK6lngPXV2GPUB+b5UHEX6w== X-Received: by 2002:a17:90b:60b:: with SMTP id gb11mr3189865pjb.122.1608125098674; Wed, 16 Dec 2020 05:24:58 -0800 (PST) Received: from lt ([2405:201:5c06:70bb:a64e:31ff:fe0c:338c]) by smtp.gmail.com with ESMTPSA id z10sm2513086pfr.204.2020.12.16.05.24.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Dec 2020 05:24:58 -0800 (PST) From: Pankaj Jangid To: bug-gnu-emacs@gnu.org Subject: Incorrect Gnus summary line number after toggle-thread and limiting Mail-Followup-To: bug-gnu-emacs@gnu.org Date: Wed, 16 Dec 2020 18:54:55 +0530 Message-ID: <87v9d1289k.fsf@codeisgreat.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=2607:f8b0:4864:20::102b; envelope-from=pankaj@codeisgreat.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) --=-=-= Content-Type: text/plain Tags: patch Set summary line format to display line number. Something like this, (setq gnus-summary-line-format "%4P %U%R%z %-16&user-date; %(%[%4L:%*%-23,23f%]%) %B%s\n" This will display line number in the first column. Start Gnus and enter any group with few emails in it (better if there are threads in it). Invoke T-T (gnus-summary-toggle-threads) or any of the limiting functions like /-/ (gnus-summary-limit-to-subject). These calls invoke gnus-summary-prepare function. And every time gnus-summary-prepare is invoked it starts increamenting line-number from the previous max. The result is that, on each refresh the line number keep on increasing. And showing incorrect values. I have moved these two lines from gnus-summary-read-group-1 to gnus-summary-prepare function. (when (boundp 'gnus-pick-line-number) (setq gnus-pick-line-number 0)) This fixes the issue. Unless there are side-effects that I am unaware of. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-12-16 built on lt Repository revision: fda9a2bbfd3adcce046c03bee72ba848c61a3e29 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster) Configured using: 'configure --prefix=/home/pankaj/.local' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=gnus-summary-line-number-fix.patch diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 9488b32487..16152e252a 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -4100,8 +4100,6 @@ gnus-summary-read-group-1 ;; The group was successfully selected. (t (gnus-set-global-variables) - (when (boundp 'gnus-pick-line-number) - (setq gnus-pick-line-number 0)) (when (boundp 'spam-install-hooks) (spam-initialize)) ;; Save the active value in effect when the group was entered. @@ -4226,6 +4224,8 @@ gnus-summary-prepare gnus-newsgroup-data-reverse nil) (gnus-run-hooks 'gnus-summary-generate-hook) ;; Generate the buffer, either with threads or without. + (when (boundp 'gnus-pick-line-number) + (setq gnus-pick-line-number 0)) (when gnus-newsgroup-headers (gnus-summary-prepare-threads (if gnus-show-threads --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 16 17:35:10 2020 Received: (at 45269) by debbugs.gnu.org; 16 Dec 2020 22:35:10 +0000 Received: from localhost ([127.0.0.1]:34177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpfO2-0008Ty-6i for submit@debbugs.gnu.org; Wed, 16 Dec 2020 17:35:10 -0500 Received: from quimby.gnus.org ([95.216.78.240]:44616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpfNz-0008TM-CA for 45269@debbugs.gnu.org; Wed, 16 Dec 2020 17:35:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pRHNuPqElfddakkDCTeFA5ns8XIhqbDGsNJgp4cspD4=; b=FEnlMET5Je1amU0ny1IOviZGqd 9YtuHy40BFLrATDqXkL5WilXA3DtWAjatdJDWNUPXw2cmyHIq++0j5+7QhRPE2GuEY+Sk2aCosvQU 0ISEOhWAzvctSutl3HZeCCqW+NkwtmjINXfmJl93SMkm0Xo8Z+9+bvJmbYb47EJzxPPg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kpfNm-00078n-Ub for 45269@debbugs.gnu.org; Wed, 16 Dec 2020 23:35:00 +0100 From: Lars Ingebrigtsen To: 45269@debbugs.gnu.org Subject: Re: bug#45269: Incorrect Gnus summary line number after toggle-thread and limiting References: <87v9d1289k.fsf@codeisgreat.org> X-Now-Playing: The Beatles's _The Beatles (3): Esher Demos_: "Julia" Date: Wed, 16 Dec 2020 23:34:53 +0100 In-Reply-To: <87v9d1289k.fsf@codeisgreat.org> (Pankaj Jangid's message of "Wed, 16 Dec 2020 18:54:55 +0530") Message-ID: <87im91mlbm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Pankaj Jangid writes: > I have moved these two lines from gnus-summary-read-group-1 to > gnus-summary-prepare function. > > (when (boundp 'gnus-pick-line-number) > (setq gnus-pick-line-number 0)) > > This fixes the issue. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45269 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pankaj Jangid writes: > I have moved these two lines from gnus-summary-read-group-1 to > gnus-summary-prepare function. > > (when (boundp 'gnus-pick-line-number) > (setq gnus-pick-line-number 0)) > > This fixes the issue. Unless there are side-effects that I am unaware > of. Looks good to me; applied to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 16 17:35:19 2020 Received: (at control) by debbugs.gnu.org; 16 Dec 2020 22:35:19 +0000 Received: from localhost ([127.0.0.1]:34180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpfOB-0008UO-Fq for submit@debbugs.gnu.org; Wed, 16 Dec 2020 17:35:19 -0500 Received: from quimby.gnus.org ([95.216.78.240]:44640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kpfO9-0008U7-F9 for control@debbugs.gnu.org; Wed, 16 Dec 2020 17:35:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xZpazSt4kRXQEy7JJoJoXr9KLIHk4dlI+aQOnr0iRtE=; b=MM6TlvPvwRLpU8WPfuxEESNLpy JSqWDvjARkrNajBZSDmt4T6HK374Fd9Ir33gAmQ+PIYKR7AX8PwyNXjYcJ9NuaUl6eW1AC7mPHq2P FDln3Kdvcoh7DVLdEl/OVxpF78VK4VEQF5oATAIGiyzdKKjnb+J8GjrZnLVQMeQOkb6g=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kpfO1-000797-ML for control@debbugs.gnu.org; Wed, 16 Dec 2020 23:35:11 +0100 Date: Wed, 16 Dec 2020 23:35:08 +0100 Message-Id: <87h7olmlb7.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #45269 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 45269 fixed close 45269 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 45269 fixed close 45269 28.1 quit From unknown Fri Aug 15 16:18:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 14 Jan 2021 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator