unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Leinen <simon.leinen@switch.ch>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: Eli Zaretskii <eliz@gnu.org>, 67526@debbugs.gnu.org
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	[thread overview]
Message-ID: <25960.20627.471292.731610@switch.ch> (raw)
In-Reply-To: <lz5y1kd0dz.fsf@switch.ch>

> 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.





  reply	other threads:[~2023-11-30  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 10:16 bug#67526: 30.0.50; Regression: gnus-group-prev-group fails to move to first group Simon Leinen
2023-11-29 13:16 ` Eli Zaretskii
2023-11-29 15:16   ` Eric Abrahamsen
2023-11-29 15:50     ` Simon Leinen
2023-11-30  9:06       ` Simon Leinen [this message]
2023-12-03 14:55         ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25960.20627.471292.731610@switch.ch \
    --to=simon.leinen@switch.ch \
    --cc=67526@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).