bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Marcin Borkowski
Subject: bug#20663: page.el (forward-page): Avoid skipping pages
Date: Mon, 11 Apr 2016 12:20:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Hi,

I spent a few minutes on this with Edebug and Git today.

On 2016-04-10, at 08:29, Pierre Neidhardt <address@hidden> wrote:

> I did not expect this patch to be so confusing, but let me clarify the above 
> questions:
>
> - `forward-page' is called by `narrow-to-page', which is bound to 'C-x n p' by
>   default.

True.

> - All the patch does it make the code consistent with its comments, that is:
>
>       ;; In case the page-delimiter matches the null string,
>       ;; don't find a match without moving.

Seems ok.

> - If you try the recipe (I just did on Emacs 24.5.1, don't have time to check
> now on upstream), you'll see that a page gets skipped, which is not the 
> desired
> behaviour.

Condirmed.  And it doesn't happen with the patch installed.

> - As for side effects, there might be some, althought I haven't noticed 
> anything
> in a year of use. If there is, then it is a bug in the caller.

That I still don't know.

I also checked when the discussed fragment was introduced.  It seems it
was commit 07f4ea7, and clearly the commiter did not adhere to the rules
concerning writing clear and informative commit messages. (SCNR;-P)
I still have a very vague idea about the patch.  I think it is crucial
to define clearly where the page boundary is.  For instance, when the
point is -!-, is the point on the first or second page here?  Emacs with
and without the patch has different opinions on that.

Page 1
-!-^L
Page 2
^L
Page 3

-- 
Marcin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]