From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Leinen Newsgroups: gmane.emacs.bugs Subject: bug#67526: 30.0.50; Regression: gnus-group-prev-group fails to move to first group Date: Thu, 30 Nov 2023 10:06:27 +0100 Message-ID: <25960.20627.471292.731610@switch.ch> References: <83h6l47l9j.fsf@gnu.org> <87il5koaj0.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22536"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 67526@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 30 10:07:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r8d12-0005aD-D5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Nov 2023 10:07:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8d0a-0001Jw-EI; Thu, 30 Nov 2023 04:06:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8d0Y-0001Ix-It for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 04:06:54 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8d0Y-0005sk-Ai for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 04:06:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8d0g-00014C-9c for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 04:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Simon Leinen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Nov 2023 09:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67526 X-GNU-PR-Package: emacs Original-Received: via spool by 67526-submit@debbugs.gnu.org id=B67526.17013352024059 (code B ref 67526); Thu, 30 Nov 2023 09:07:02 +0000 Original-Received: (at 67526) by debbugs.gnu.org; 30 Nov 2023 09:06:42 +0000 Original-Received: from localhost ([127.0.0.1]:52277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8d0M-00013O-1p for submit@debbugs.gnu.org; Thu, 30 Nov 2023 04:06:42 -0500 Original-Received: from mx3.switch.ch ([85.235.88.34]:58171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8d0I-00013E-P5 for 67526@debbugs.gnu.org; Thu, 30 Nov 2023 04:06:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=switch.ch; l=1718; s=selector1; t=1701335191; h=mime-version:content-transfer-encoding:message-id:date: from:to:cc:subject:in-reply-to:references; bh=7qqRaLlgC61egMdtXuj8xA1aXlGTQVr4wT6Qlp2MZpE=; b=U30F1jAYnD7p8u8nyaaIsZqng4WLp+/Lmt6vNTpMb3kxqzN/pjwvRQ6f 9Iksqleca3BTbP0RKUDYtpuxvncHGjy75H2Ih5+rsEwsRLjnOBT9/SQ0o qmCc9RT7PY6+/2Zqg5sQdyKjgncX3Wb+EzBy8FMtu9y0pm/nOmeEqX9eC BludtZXJdC95fbELuXNUY7WSof/7YWBEkZAUdDNZIBrsolkMHBmNWAB8R JwB7Q8wfO+iMrtuzjFDsQjueCPUDaxt+HSTYfiCp/Y+Cvtae5Wcy1//bY 1iT3kP/RWQ55ETvTLW3lx7c1OG7riouRHfx8WqS2Hg4vwbrQgqcOAAJrh w==; X-IronPort-MAIL-FROM: simon.leinen@switch.ch X-IronPort-RCPT-TO: 67526@debbugs.gnu.org, eliz@gnu.org, eric@ericabrahamsen.net X-IronPort-AV: E=Sophos;i="6.04,237,1695679200"; d="scan'208";a="6167072" Original-Received: from unknown (HELO SWH-S04-EXC2.swd.switch.ch) ([172.16.60.12]) by mx3int.switch.ch with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 10:06:28 +0100 Original-Received: from macsl (172.16.60.33) by SWH-S04-EXC2.swd.switch.ch (172.16.60.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Thu, 30 Nov 2023 10:06:27 +0100 In-Reply-To: X-Mailer: VM 8.2.0b under 30.0.50 (aarch64-apple-darwin22.6.0) X-Originating-IP: [172.16.60.33] X-ClientProxiedBy: SWH-S05-EXC3.swd.switch.ch (172.16.60.14) To SWH-S04-EXC2.swd.switch.ch (172.16.60.12) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275281 Archived-At: > I do note that the issue goes away when I revert a bit of your > change, as follows. I haven't found out *why* that is necessary to > get the old behavior back... OK, I think I know now. It was a mistake to add the "(if backward (bobp) ...)" branch. Probably the intent was to restore symmetry for the backward-moving case. But the pre-existing (eobp) test will succeed only when the cursor is *beyond* the last newsgroup line - because the end of the buffer is not at the end of the last newsgroup line, but on an empty line *after* that last newsgroup line. Testing for (bobp) in the backwards case is not equivalent, because (at least in my case) the beginning of the buffer position is very much *on* a valid/eligible newsgroup line. Maybe this is not the case for Eric, because he uses topic mode? Anyway in my limited testing, the old logic works fine for that case too. So I suggest to revert that part of Eric's change, as per the patch I'm resending here with a correction - I had written ENDP instead of EOBP, sorry about the confusion. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9a1a6f9b27d..f2258026eca 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1758,7 +1758,7 @@ gnus-group-search-forward (unless first-too (forward-line way)) (while (and - (not (if backward (bobp) (eobp))) + (not (eobp)) (not (setq found (and If you're worried - and I haven't thought through whether this should be of any concern - that the (eobp) check should not be done in the backwards case, then a suitable alternate clause could be (or backward (not (eobp))) -- Simon.