From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.bugs Subject: bug#20663: page.el (forward-page): Avoid skipping pages Date: Mon, 11 Apr 2016 12:20:07 +0200 Message-ID: <87fuus30rs.fsf@mbork.pl> References: <20150526171440.GG647@gmail.com> <87h9fbum2w.fsf@mbork.pl> <83h9fbhu0p.fsf@gnu.org> <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> <20160410012924.GA23097@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1460370076 15963 80.91.229.3 (11 Apr 2016 10:21:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2016 10:21:16 +0000 (UTC) Cc: 20663@debbugs.gnu.org To: Pierre Neidhardt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 11 12:21:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1apYy2-0007Yf-7I for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Apr 2016 12:21:14 +0200 Original-Received: from localhost ([::1]:51939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apYy1-00034V-E6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Apr 2016 06:21:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apYxu-00032X-VK for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2016 06:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apYxr-00048a-NZ for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2016 06:21:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apYxr-00048O-K7 for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2016 06:21:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1apYxq-0008Ic-BP for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2016 06:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marcin Borkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Apr 2016 10:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20663 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20663-submit@debbugs.gnu.org id=B20663.146037001931848 (code B ref 20663); Mon, 11 Apr 2016 10:21:02 +0000 Original-Received: (at 20663) by debbugs.gnu.org; 11 Apr 2016 10:20:19 +0000 Original-Received: from localhost ([127.0.0.1]:58018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apYx9-0008Hc-H6 for submit@debbugs.gnu.org; Mon, 11 Apr 2016 06:20:19 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:56350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apYx8-0008HU-0j for 20663@debbugs.gnu.org; Mon, 11 Apr 2016 06:20:18 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 29B8DAB2210; Mon, 11 Apr 2016 12:20:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8QWM1mFN8Jmg; Mon, 11 Apr 2016 12:20:11 +0200 (CEST) Original-Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id AD828AB2415; Mon, 11 Apr 2016 12:20:11 +0200 (CEST) In-Reply-To: <20160410012924.GA23097@gmail.com> (Pierre Neidhardt's message of "Sun, 10 Apr 2016 08:29:24 +0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116374 Archived-At: Hi, I spent a few minutes on this with Edebug and Git today. On 2016-04-10, at 08:29, Pierre Neidhardt 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