GNU bug report logs - #20663
page.el (forward-page): Avoid skipping pages

Previous Next

Package: emacs;

Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>

Date: Tue, 26 May 2015 17:23:02 UTC

Severity: minor

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #73 received at 20663 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Daniel Kraus <daniel <at> kraus.my>
Cc: 20663 <at> debbugs.gnu.org, Pierre Neidhardt <ambrevar <at> gmail.com>
Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages
Date: Thu, 09 Jun 2022 12:21:55 +0200
Daniel Kraus <daniel <at> kraus.my> writes:

>>> When `page-delimiter` starts at the beginning of the line and the position is
>>> also at the beginning of the line, calling `forward-page` will skip one page.
>>>
>>> Running `emacs -Q example.txt`:
>>>
>>> 	M-<
>>> 	C-x n p
>>> 	M->
>>> 	M-1 C-x n p
>>>
>>> This should bring us from page 1 to page 2, but page 3 gets
>>> displayed instead.

[...]

> This patch seems to change the behavior of `forward-page` compared to before.
> Before when the point was inside (/beginning) of the page-delimiter regex
> it would jump imho correctly to the next page.
>
> Now it just skips the page delimiter and goes to the end.

Well, that was the point of the change, really

The problem with the old behaviour was most obvious when narrowing to a
page.  If you're narrowed to page 1 (with point at the end of the
buffer), issuing a "go to the next page" would take you to page 3.

I.e., there was a disconnect between what it was considering the
"current page" and how narrowing to a page would display that, and the
change made these things match up -- now (with point just before the
page delimiter) it says that it's on the previous page, not the next
page.

Perhaps this should be tweaked for longer page delimiters, so that we're
on the next page when point is inside the delimiter?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.