From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 13:22:35 2015 Received: (at submit) by debbugs.gnu.org; 26 May 2015 17:22:36 +0000 Received: from localhost ([127.0.0.1]:57328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YxIYl-000646-2e for submit@debbugs.gnu.org; Tue, 26 May 2015 13:22:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39237) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YxIPm-0005oy-HE for submit@debbugs.gnu.org; Tue, 26 May 2015 13:13:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxIPg-0003yv-E9 for submit@debbugs.gnu.org; Tue, 26 May 2015 13:13:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_FAKE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxIPg-0003yk-Bu for submit@debbugs.gnu.org; Tue, 26 May 2015 13:13:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxIPf-0002VU-FW for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 13:13:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxIPa-0003wC-Ao for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 13:13:11 -0400 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:32951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxIPa-0003vZ-3Z for bug-gnu-emacs@gnu.org; Tue, 26 May 2015 13:13:06 -0400 Received: by lalw1 with SMTP id w1so4855463lal.0 for ; Tue, 26 May 2015 10:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=/VjLUp/QmN8FM16kiVUlwBdYb7Mu8l8t7LWDHCNLM9w=; b=WLgT/p5mNJVseSm/zXT1G42e90JRBlhy4acoZ4ZLdaJLJ6KA9X6UQZcHazfBkQrhJE E9O/HFHR14wCsJfyihDB4UcQttIkdSKc5hTwO0e7soI9vTsX5nPIkyhCNstJ0Yu3PMuu RPv97YdOjxEErQk720IjGd8u5wcA/YJW/ooy1GT0ZzrN41zzoMXI5ZKHhheVkyigWa7o LyzCUDa5Eb6WP2U9uSKvbR1AX55SD63NDmQQw+/dkWc4Rf26ICklPFDGuY+OvrncAtIO kqjGE4uqd0o9F4gI9Hc75jpcKeAEkgocayVwvrz1EnXZTgehInBT0uDiTD1+eq57EdsZ FCzw== X-Received: by 10.112.51.146 with SMTP id k18mr23388590lbo.91.1432660384810; Tue, 26 May 2015 10:13:04 -0700 (PDT) Received: from gmail.com (c80-217-163-156.bredband.comhem.se. [80.217.163.156]) by mx.google.com with ESMTPSA id jl4sm3168349lbc.14.2015.05.26.10.13.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 10:13:04 -0700 (PDT) Date: Tue, 26 May 2015 19:14:40 +0200 From: Pierre Neidhardt To: bug-gnu-emacs@gnu.org Subject: page.el (forward-page): Avoid skipping pages Message-ID: <20150526171440.GG647@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 26 May 2015 13:22:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.5 (--) --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. The attached patch fixes it by changing the code to actually match its surrounding comments. In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-04-20 on bitzer.hoetzel.info Windowing system distributor `The X.Org Foundation', version 11.0.11701000 System Description: Arch Linux Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LC_MESSAGES: sv_SE.UTF-8 value of $LANG: sv_SE.UTF-8 locale-coding-system: utf-8-unix -- Pierre Neidhardt Virginia law forbids bathtubs in the house; tubs must be kept in the yard. --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=ChangeLog * page.el (forward-page): Avoid skipping pages --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="example.txt" Page 1 Page 2 Page 3 --xHFwDpU9dbj6ez1V Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="page.patch" diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index 39db5bb..c875a49 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el @@ -37,7 +37,7 @@ A page boundary is any line whose beginning matches the regexp (while (and (> count 0) (not (eobp))) ;; In case the page-delimiter matches the null string, ;; don't find a match without moving. - (if (bolp) (forward-char 1)) + (if (string= page-delimiter "") (forward-char 1)) (if (re-search-forward page-delimiter nil t) nil (goto-char (point-max))) --xHFwDpU9dbj6ez1V-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 06:13:22 2016 Received: (at 20663) by debbugs.gnu.org; 9 Apr 2016 10:13:22 +0000 Received: from localhost ([127.0.0.1]:55186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoptK-0007RL-L2 for submit@debbugs.gnu.org; Sat, 09 Apr 2016 06:13:22 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:33312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoptJ-0007RD-IG for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 06:13:21 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 74BA4AA51D5; Sat, 9 Apr 2016 12:13:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 l3QVeBNBLJTw; Sat, 9 Apr 2016 12:13:17 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 398B2AA51D4; Sat, 9 Apr 2016 12:13:17 +0200 (CEST) From: Marcin Borkowski To: Pierre Neidhardt Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages References: <20150526171440.GG647@gmail.com> Date: Sat, 09 Apr 2016 12:13:11 +0200 In-Reply-To: <20150526171440.GG647@gmail.com> (Pierre Neidhardt's message of "Tue, 26 May 2015 19:14:40 +0200") Message-ID: <87h9fbum2w.fsf@mbork.pl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2015-05-26, at 19:14, Pierre Neidhardt wrote: > 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. > > The attached patch fixes it by changing the code to actually match its > surrounding comments. Hi Emacs devs, could someone take a look at the proposed patch? It is not installed as of GNU Emacs 25.1.50.8 (commit 1e8cd05), and I don't feel competent enough to be sure it does not have any adverse side effects. Best, -- Marcin From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 08:00:53 2016 Received: (at 20663) by debbugs.gnu.org; 9 Apr 2016 12:00:53 +0000 Received: from localhost ([127.0.0.1]:55230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aorZN-0003AX-JY for submit@debbugs.gnu.org; Sat, 09 Apr 2016 08:00:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aorZM-0003AI-NU for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 08:00:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aorZE-0003eH-FG for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 08:00:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aorZE-0003e9-C4; Sat, 09 Apr 2016 08:00:44 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1490 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aorZD-0006df-Kr; Sat, 09 Apr 2016 08:00:44 -0400 Date: Sat, 09 Apr 2016 15:00:06 +0300 Message-Id: <83h9fbhu0p.fsf@gnu.org> From: Eli Zaretskii To: Marcin Borkowski In-reply-to: <87h9fbum2w.fsf@mbork.pl> (message from Marcin Borkowski on Sat, 09 Apr 2016 12:13:11 +0200) Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages References: <20150526171440.GG647@gmail.com> <87h9fbum2w.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Marcin Borkowski > Date: Sat, 09 Apr 2016 12:13:11 +0200 > Cc: 20663@debbugs.gnu.org > > On 2015-05-26, at 19:14, Pierre Neidhardt wrote: > > > 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. > > > > The attached patch fixes it by changing the code to actually match its > > surrounding comments. > > Hi Emacs devs, > > could someone take a look at the proposed patch? It is not installed as > of GNU Emacs 25.1.50.8 (commit 1e8cd05), and I don't feel competent > enough to be sure it does not have any adverse side effects. Maybe I'm missing something, but I don't see the connection between the description of the bug, the recipe, and the patch. The description talks about calling forward-page, but the recipe doesn't call it. The patch compares page-delimiter with an empty string, but the default value of page-delimiter is not empty. So I'm mightily confused by this. Hopefully, someone will show me what I'm missing. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 14:16:55 2016 Received: (at 20663) by debbugs.gnu.org; 9 Apr 2016 18:16:55 +0000 Received: from localhost ([127.0.0.1]:56334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoxRG-00044Z-QR for submit@debbugs.gnu.org; Sat, 09 Apr 2016 14:16:55 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:42231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoxRF-00044Q-6b for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 14:16:53 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 00194AA92D1; Sat, 9 Apr 2016 20:16:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 oh6zz4V8KJdg; Sat, 9 Apr 2016 20:16:48 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 7D044AA92CE; Sat, 9 Apr 2016 20:16:48 +0200 (CEST) References: <20150526171440.GG647@gmail.com> <87h9fbum2w.fsf@mbork.pl> <83h9fbhu0p.fsf@gnu.org> User-agent: mu4e 0.9.13; emacs 25.1.50.8 From: Marcin Borkowski To: Eli Zaretskii Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages In-reply-to: <83h9fbhu0p.fsf@gnu.org> Date: Sat, 09 Apr 2016 20:16:47 +0200 Message-ID: <871t6eve9c.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-04-09, at 12:00, Eli Zaretskii wrote: >> From: Marcin Borkowski >> Date: Sat, 09 Apr 2016 12:13:11 +0200 >> Cc: 20663@debbugs.gnu.org >> >> On 2015-05-26, at 19:14, Pierre Neidhardt wrote: >> >> > 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. >> > >> > The attached patch fixes it by changing the code to actually match its >> > surrounding comments. >> >> Hi Emacs devs, >> >> could someone take a look at the proposed patch? It is not installed as >> of GNU Emacs 25.1.50.8 (commit 1e8cd05), and I don't feel competent >> enough to be sure it does not have any adverse side effects. > > Maybe I'm missing something, but I don't see the connection between > the description of the bug, the recipe, and the patch. > > The description talks about calling forward-page, but the recipe > doesn't call it. The patch compares page-delimiter with an empty > string, but the default value of page-delimiter is not empty. > > So I'm mightily confused by this. Hopefully, someone will show me > what I'm missing. Well, I quickly glanced over the patch and decided that even if it worked for me, I wouldn't be sure whether it doesn't break something else. Since you claim it rather won't work, I'm now tempted to look at this issue more closely. Hopefully I'll be able to come up with a better patch in a few days. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 15:35:25 2016 Received: (at 20663) by debbugs.gnu.org; 9 Apr 2016 19:35:25 +0000 Received: from localhost ([127.0.0.1]:56386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoyfF-0005vT-Hm for submit@debbugs.gnu.org; Sat, 09 Apr 2016 15:35:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoyfD-0005vH-Um for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 15:35:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoyf5-0002Rb-I1 for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 15:35:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoyf5-0002RX-Eb; Sat, 09 Apr 2016 15:35:15 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2173 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aoyf4-0005zm-Nm; Sat, 09 Apr 2016 15:35:15 -0400 Date: Sat, 09 Apr 2016 22:34:38 +0300 Message-Id: <837fg6injl.fsf@gnu.org> From: Eli Zaretskii To: Marcin Borkowski In-reply-to: <871t6eve9c.fsf@mbork.pl> (message from Marcin Borkowski on Sat, 09 Apr 2016 20:16:47 +0200) Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages References: <20150526171440.GG647@gmail.com> <87h9fbum2w.fsf@mbork.pl> <83h9fbhu0p.fsf@gnu.org> <871t6eve9c.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Marcin Borkowski > Cc: ambrevar@gmail.com, 20663@debbugs.gnu.org > Date: Sat, 09 Apr 2016 20:16:47 +0200 > > Well, I quickly glanced over the patch and decided that even if it > worked for me, I wouldn't be sure whether it doesn't break something > else. Since you claim it rather won't work I don't claim it doesn't work, I just don't have a clear understanding of the problem, and consequently don't understand the solution, and cannot judge whether it's TRT. > I'm now tempted to look at this issue more closely. Hopefully I'll > be able to come up with a better patch in a few days. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 21:26:48 2016 Received: (at 20663) by debbugs.gnu.org; 10 Apr 2016 01:26:48 +0000 Received: from localhost ([127.0.0.1]:56468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ap49I-0005zd-1M for submit@debbugs.gnu.org; Sat, 09 Apr 2016 21:26:48 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ap49G-0005zP-C0 for 20663@debbugs.gnu.org; Sat, 09 Apr 2016 21:26:46 -0400 Received: by mail-pa0-f67.google.com with SMTP id zy2so11694735pac.2 for <20663@debbugs.gnu.org>; Sat, 09 Apr 2016 18:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=77+yjqm6il57NsBfuVJ/FbZwTJ2ikSda5VIYp3TVEUQ=; b=aw695Lod5bueBzGpfoHKZFNJJlo+sMKLALLHo6Weqxezk/aW3ZN0ZgEBwhZW0KigjI 94ohw2w8mtHmJyEByJUrGSiTYygvqH8/Ty+B4beC/Zr+9OAnCQUXCA7WQLKGNK6himDh CZ0SkcOZPmx55EZbd+e3d6UWYZmBXt+Q+fHzryb8Wl1HzyjpU3mzcHoyxjhUzpLMUfpy QnqK9AvruS4iV4p5sNNY2cfbyhNpJuZ/lKoPlateZb52GsHsTP31TkHjPfg08G951SMR Ad7kYAAzx8zf4431TeCprVj5tXsilsBagUmHm8OhtFA4uXXvMtaEujp+2QTQvegDZiLP ugfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=77+yjqm6il57NsBfuVJ/FbZwTJ2ikSda5VIYp3TVEUQ=; b=BZRmrOQ3mQgXFjdCuIWFewo/G8fFhtDTp2PCaIbrpeoVW48fz7QTQXPRJG0XC0jSBx aFNhC97zRn7Qqndo1pVTd0nN0kwrKKBslknBsi7Ea746QvQFBV13CZxSsCbbGuRsXCFK YSytVHAEeq6CeyVqrvHMcqFhkY8vtbQxdWEDOS1eB/RtGR4DkhqO6mgH1KYk+DH9Zw9T yQpr9dhnL0S0c71upj1OQNggQHHKYr97n4eOj1SsZLycmhrJY5WDVrAyyZJro7MO4+Su yX5g1LX519ppyzHZhryPc1At7AEkrTsNF5LtCciuVh2c8d+rTgnyabVOYmuWNHiiD7ub sOcQ== X-Gm-Message-State: AD7BkJICsOhp9Qm3EyvM4Bov2JutIn6qBR01xTxZ4TQ2w5JrnqgvcJ0yjS0VM7eUovD26g== X-Received: by 10.66.235.9 with SMTP id ui9mr23091510pac.135.1460251600511; Sat, 09 Apr 2016 18:26:40 -0700 (PDT) Received: from gmail.com ([116.106.2.232]) by smtp.gmail.com with ESMTPSA id s26sm27340672pfa.0.2016.04.09.18.26.38 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Apr 2016 18:26:40 -0700 (PDT) Date: Sun, 10 Apr 2016 08:29:24 +0700 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages Message-ID: <20160410012924.GA23097@gmail.com> References: <20150526171440.GG647@gmail.com> <87h9fbum2w.fsf@mbork.pl> <83h9fbhu0p.fsf@gnu.org> <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <837fg6injl.fsf@gnu.org> X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, Marcin Borkowski X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. - 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. - 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. - 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. -- Pierre Neidhardt From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 11 06:20:19 2016 Received: (at 20663) by debbugs.gnu.org; 11 Apr 2016 10:20:19 +0000 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 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 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 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) 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) From: Marcin Borkowski To: Pierre Neidhardt Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages 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> Date: Mon, 11 Apr 2016 12:20:07 +0200 In-Reply-To: <20160410012924.GA23097@gmail.com> (Pierre Neidhardt's message of "Sun, 10 Apr 2016 08:29:24 +0700") Message-ID: <87fuus30rs.fsf@mbork.pl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: Eli Zaretskii , 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 11 11:35:48 2016 Received: (at 20663) by debbugs.gnu.org; 11 Apr 2016 15:35:48 +0000 Received: from localhost ([127.0.0.1]:59597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apdsS-0000ym-HI for submit@debbugs.gnu.org; Mon, 11 Apr 2016 11:35:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apdsR-0000yZ-14 for 20663@debbugs.gnu.org; Mon, 11 Apr 2016 11:35:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apdsG-00045E-3w for 20663@debbugs.gnu.org; Mon, 11 Apr 2016 11:35:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apdsF-000458-PT; Mon, 11 Apr 2016 11:35:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4991 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1apdsE-0007tF-H4; Mon, 11 Apr 2016 11:35:35 -0400 Date: Mon, 11 Apr 2016 18:35:03 +0300 Message-Id: <8337qsgnvc.fsf@gnu.org> From: Eli Zaretskii To: Marcin Borkowski In-reply-to: <87fuus30rs.fsf@mbork.pl> (message from Marcin Borkowski on Mon, 11 Apr 2016 12:20:07 +0200) Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages 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> <87fuus30rs.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Marcin Borkowski > Cc: Eli Zaretskii , 20663@debbugs.gnu.org > Date: Mon, 11 Apr 2016 12:20:07 +0200 > > I spent a few minutes on this with Edebug and Git today. Thanks. > > - 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. Can one of you please explain why the original code misbehaves? > 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. Good point. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 13 13:53:41 2016 Received: (at 20663) by debbugs.gnu.org; 13 Apr 2016 17:53:41 +0000 Received: from localhost ([127.0.0.1]:33975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqOyz-00016D-0l for submit@debbugs.gnu.org; Wed, 13 Apr 2016 13:53:41 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:34714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqOyx-000165-EP for 20663@debbugs.gnu.org; Wed, 13 Apr 2016 13:53:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id F1EE6ABF294; Wed, 13 Apr 2016 19:53:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 zHPs4SUYW5Qu; Wed, 13 Apr 2016 19:53:35 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 48A85ABF293; Wed, 13 Apr 2016 19:53:35 +0200 (CEST) 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> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> User-agent: mu4e 0.9.13; emacs 25.1.50.8 From: Marcin Borkowski To: Eli Zaretskii Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages In-reply-to: <8337qsgnvc.fsf@gnu.org> Date: Wed, 13 Apr 2016 19:53:31 +0200 Message-ID: <87a8kxcs4k.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-04-11, at 15:35, Eli Zaretskii wrote: >> From: Marcin Borkowski >> Cc: Eli Zaretskii , 20663@debbugs.gnu.org >> Date: Mon, 11 Apr 2016 12:20:07 +0200 >> >> I spent a few minutes on this with Edebug and Git today. > > Thanks. > >> > - 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. > > Can one of you please explain why the original code misbehaves? Quoting from the original report: --8<---------------cut here---------------start------------->8--- > 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. --8<---------------cut here---------------end--------------->8--- >> 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. > > Good point. Here's the relevant excerpt from the manual: --8<---------------cut here---------------start------------->8--- The variable ‘page-delimiter’ controls where pages begin. Its value is a regular expression that matches the beginning of a line that separates pages (*note Regexps::). The normal value of this variable is ‘"^\f"’, which matches a formfeed character at the beginning of a line. --8<---------------cut here---------------end--------------->8--- Is it me or is the above ambiguous? I'm a bit busy now, but I'll make a second attempt at this issue within a few days. One of the problems is that (as the above paragraph seems to confirm) the very notion of a "page" in Emacs is vague. IMHO we should start with a clear definition of a "page". It is well possible that different functions in page.el use different interpretations of this notion, and the bug is just a symptom if such a mess. My proposal is that a "page separator" would be a position in the buffer where (looking-at-p page-delimiter) is true, and if point is at such a place, then we consider it on the next page. I.e., in this situation abcabcabc -!-^L cbacbacba the point is already on the second page (unlike the default Emacs behavior). Then, someone should study page.el and where necessary, update it to the precisely defined notion of a "page". (The mythical "someone" might be me.) WDYT? -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 13 16:15:13 2016 Received: (at 20663) by debbugs.gnu.org; 13 Apr 2016 20:15:13 +0000 Received: from localhost ([127.0.0.1]:34014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqRBx-0004Pk-BZ for submit@debbugs.gnu.org; Wed, 13 Apr 2016 16:15:13 -0400 Received: from mail-yw0-f173.google.com ([209.85.161.173]:35158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqRBv-0004PW-Lo for 20663@debbugs.gnu.org; Wed, 13 Apr 2016 16:15:12 -0400 Received: by mail-yw0-f173.google.com with SMTP id i84so82651388ywc.2 for <20663@debbugs.gnu.org>; Wed, 13 Apr 2016 13:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ao2zE8NKxZI/5OBsQg5kZJk1C+1KZglsNJhRIpUJfek=; b=PwZS7TG6Rbpea/PdKwGCHMzd7zNY7M90DlvNCcrxPPV0pyp1/DeUiDTclecZpTyOhy 4o8h+i8AMMXHOGX1kSjuvSBJnwFPzPcIoe7ZtEOpttmOPvtfhTqJmecgG/AuqgvA5+8M NBz9AG9eBeCXsYZkTMPUePQbkESQMczhaAim2olurOZSTqfuO9sJrCgxMCC0c+LrlQj1 NK4kaAZYOqgwkZXYaWllHohYmJPBqzG+5dtbtYGmAeiKLMkekoDQn4nZQvCdH6b/Evup lMbj38F7Hm7/53wyRlBzrl69IUg8bGnP6HETEFExbY1vY/WI7Ko89xAUv3TbndeEMdgd VhVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ao2zE8NKxZI/5OBsQg5kZJk1C+1KZglsNJhRIpUJfek=; b=YJwkXHSB4tnXYij2BIQJkrOFDR+yhNnV97QsaV6Q6bcOVYCwAb4/PNnHMLkiMNZEDv 5Cy23vR/GxnnAqfyyvTK7EEXBw4WRTD+pH4bxPbRAGukJl3dw1sHZsA/Wn+Hhc4K+ucl XUfu0o+rX68tlMxQVXp151irT/5VsKJ45FQAJl2YPj6AAEgd5I9OjQqXVfvNmmen4QtY 0iaYcJUDplC/g1GBhDNBKTySTjVBo7bFrDSMvTkQ7u1jkMR9Q3GrjyMZgZD2NxaF2+Fy JNqcb2DkKF0QFLgmIa4leYzcZknODHHLycLny/JYZM1snM9IzwHVhxMNkP56jHzetrno L0Yw== X-Gm-Message-State: AOPr4FWRlg1lPM3rl0zI6/XoP0i63uwqnjE0dXUblyBkX10GGcO/LCWi5/XWgdHYsKx1KRSTPucFouDapEr5ag== X-Received: by 10.129.103.85 with SMTP id b82mr5848852ywc.127.1460578505854; Wed, 13 Apr 2016 13:15:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.71.86 with HTTP; Wed, 13 Apr 2016 13:14:46 -0700 (PDT) In-Reply-To: <87a8kxcs4k.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> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> From: John Mastro Date: Wed, 13 Apr 2016 13:14:46 -0700 Message-ID: Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages To: Marcin Borkowski Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 20663 Cc: Eli Zaretskii , 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Marcin Borkowski wrote: > My proposal is that a "page separator" would be a position in the buffer > where (looking-at-p page-delimiter) is true, and if point is at such > a place, then we consider it on the next page. I.e., in this situation > > abcabcabc > -!-^L > cbacbacba > > the point is already on the second page (unlike the default Emacs > behavior). That seems somewhat confusing to me. Intuitively, I would expect the new page to start after the delimiter, not immediately before it For comparison, when (looking-at-p "$") returns non-nil, that means point is at the end of the current line (i.e. before the "\n"), not the beginning of the next one. (Of course, they're not exactly the same, since page-delimiter can match multiple characters.) -- john From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 13 16:54:31 2016 Received: (at 20663) by debbugs.gnu.org; 13 Apr 2016 20:54:31 +0000 Received: from localhost ([127.0.0.1]:34058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqRnz-0005RO-3q for submit@debbugs.gnu.org; Wed, 13 Apr 2016 16:54:31 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:39829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqRny-0005RF-4R for 20663@debbugs.gnu.org; Wed, 13 Apr 2016 16:54:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id A133AABFB61; Wed, 13 Apr 2016 22:54:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 zgKEH6YJPjH1; Wed, 13 Apr 2016 22:54:26 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 5BD03ABFB5F; Wed, 13 Apr 2016 22:54:26 +0200 (CEST) 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> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> User-agent: mu4e 0.9.13; emacs 25.1.50.8 From: Marcin Borkowski To: John Mastro Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages In-reply-to: Date: Wed, 13 Apr 2016 22:54:25 +0200 Message-ID: <8760vlcjr2.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: Eli Zaretskii , 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-04-13, at 20:14, John Mastro wrote: > Marcin Borkowski wrote: >> My proposal is that a "page separator" would be a position in the buffer >> where (looking-at-p page-delimiter) is true, and if point is at such >> a place, then we consider it on the next page. I.e., in this situation >> >> abcabcabc >> -!-^L >> cbacbacba >> >> the point is already on the second page (unlike the default Emacs >> behavior). > > That seems somewhat confusing to me. Intuitively, I would expect the new > page to start after the delimiter, not immediately before it > > For comparison, when (looking-at-p "$") returns non-nil, that means > point is at the end of the current line (i.e. before the "\n"), not the > beginning of the next one. (Of course, they're not exactly the same, > since page-delimiter can match multiple characters.) Well, I'm fine with that version, too - but I'd insist that we should settle on _something_ and make it clear in the docs. BTW, the argument for my variant would be that a new page would always start at beginning of (some) line (assuming that `page-delimiter' starts with "^", as it does by default). (I don't claim that it's especially strong argument, I just wanted to mention it.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 16 07:03:51 2016 Received: (at 20663) by debbugs.gnu.org; 16 Apr 2016 11:03:51 +0000 Received: from localhost ([127.0.0.1]:37095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arO11-0006xf-7e for submit@debbugs.gnu.org; Sat, 16 Apr 2016 07:03:51 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:47690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arO0z-0006xX-RX for 20663@debbugs.gnu.org; Sat, 16 Apr 2016 07:03:50 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id CE786ACB507; Sat, 16 Apr 2016 13:03:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 OzPnMrLhwb63; Sat, 16 Apr 2016 13:03:45 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 153E8ACB506; Sat, 16 Apr 2016 13:03:45 +0200 (CEST) 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> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> User-agent: mu4e 0.9.13; emacs 25.1.50.8 From: Marcin Borkowski To: Eli Zaretskii Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages Message-ID: <8760vhvmr9.fsf@mbork.pl> In-reply-to: <87a8kxcs4k.fsf@mbork.pl> Date: Sat, 16 Apr 2016 13:03:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-04-13, at 17:53, Marcin Borkowski wrote: > Here's the relevant excerpt from the manual: > > --8<---------------cut here---------------start------------->8--- > The variable ‘page-delimiter’ controls where pages begin. Its value > is a regular expression that matches the beginning of a line that > separates pages (*note Regexps::). The normal value of this variable is > ‘"^\f"’, which matches a formfeed character at the beginning of a line. > --8<---------------cut here---------------end--------------->8--- > > Is it me or is the above ambiguous? > > > I'm a bit busy now, but I'll make a second attempt at this issue within > a few days. One of the problems is that (as the above paragraph seems > to confirm) the very notion of a "page" in Emacs is vague. IMHO we > should start with a clear definition of a "page". It is well possible > that different functions in page.el use different interpretations of > this notion, and the bug is just a symptom if such a mess. > > My proposal is that a "page separator" would be a position in the buffer > where (looking-at-p page-delimiter) is true, and if point is at such > a place, then we consider it on the next page. I.e., in this situation > > abcabcabc > -!-^L > cbacbacba > > the point is already on the second page (unlike the default Emacs > behavior). > > Then, someone should study page.el and where necessary, update it to the > precisely defined notion of a "page". (The mythical "someone" might be > me.) > > WDYT? OK, I got almost no responses so far:-(. In the meantime, I started to study this issue. It seems that `forward-page' indeed has a bug. Here's the recipe (slightly modified from the OP's one). With this buffer state: --8<---------------cut here---------------start------------->8--- Page 1 -!-^L Page 2 ^L Page 3 --8<---------------cut here---------------end--------------->8--- press `C-x ]' (`forward-page'). Now the point moves across /two/ form-feed characters. Is that intentional? Seems broken for me. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 16 07:27:21 2016 Received: (at 20663) by debbugs.gnu.org; 16 Apr 2016 11:27:21 +0000 Received: from localhost ([127.0.0.1]:37151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arONk-0007XW-Vx for submit@debbugs.gnu.org; Sat, 16 Apr 2016 07:27:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arONj-0007XK-Ad for 20663@debbugs.gnu.org; Sat, 16 Apr 2016 07:27:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arONa-0000uM-Us for 20663@debbugs.gnu.org; Sat, 16 Apr 2016 07:27:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arONa-0000uI-Rd; Sat, 16 Apr 2016 07:27:10 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3120 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1arONa-00015U-1n; Sat, 16 Apr 2016 07:27:10 -0400 Date: Sat, 16 Apr 2016 14:26:51 +0300 Message-Id: <83shylbxqc.fsf@gnu.org> From: Eli Zaretskii To: Marcin Borkowski In-reply-to: <87a8kxcs4k.fsf@mbork.pl> (message from Marcin Borkowski on Wed, 13 Apr 2016 19:53:31 +0200) Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages 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> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Marcin Borkowski > Cc: ambrevar@gmail.com, 20663@debbugs.gnu.org > Date: Wed, 13 Apr 2016 19:53:31 +0200 > > > Can one of you please explain why the original code misbehaves? > > Quoting from the original report: > > --8<---------------cut here---------------start------------->8--- > > 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. > --8<---------------cut here---------------end--------------->8--- Yes, I've read that. I asked for an explanation of _why_ the code currently in Emacs misbehaves in this recipe. Can one of you describe that? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 20 03:32:51 2016 Received: (at 20663) by debbugs.gnu.org; 20 Apr 2016 07:32:52 +0000 Received: from localhost ([127.0.0.1]:40957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1asmd1-00034v-KO for submit@debbugs.gnu.org; Wed, 20 Apr 2016 03:32:51 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:35572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1asmcz-00034l-CJ for 20663@debbugs.gnu.org; Wed, 20 Apr 2016 03:32:50 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 6F486AE51C9; Wed, 20 Apr 2016 09:32:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 7+ZzZw2aYPr3; Wed, 20 Apr 2016 09:32:41 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 0EAE2AE51C7; Wed, 20 Apr 2016 09:32:41 +0200 (CEST) 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> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> <83shylbxqc.fsf@gnu.org> User-agent: mu4e 0.9.13; emacs 25.1.50.8 From: Marcin Borkowski To: Eli Zaretskii Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages In-reply-to: <83shylbxqc.fsf@gnu.org> Date: Wed, 20 Apr 2016 09:32:37 +0200 Message-ID: <871t607n1m.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-04-16, at 11:26, Eli Zaretskii wrote: >> From: Marcin Borkowski >> Cc: ambrevar@gmail.com, 20663@debbugs.gnu.org >> Date: Wed, 13 Apr 2016 19:53:31 +0200 >> >> > Can one of you please explain why the original code misbehaves? >> >> Quoting from the original report: >> >> --8<---------------cut here---------------start------------->8--- >> > 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. >> --8<---------------cut here---------------end--------------->8--- > > Yes, I've read that. I asked for an explanation of _why_ the code > currently in Emacs misbehaves in this recipe. Can one of you describe > that? Let me try (note: this is partly my conjecture!). Since the concept of a "page delimiter" is vague in Emacs (the manual suggests that a page delimiter is a _line_ such that `page-delimiter' matches at its beginning, common sense suggests that it is a _substring_ of the buffer matching `page-delimiter', it's probable that someone decided that if the point is at the beginning of a line and matches `page-delimiter', then `forward-page' shouldn't just move past the text matching `page-delimiter' we are on, but the next one. So the author of the current version of `forward-page' decided just to move one character forward (in case we are at the line beginning), so that `page-delimiter' won't match. This I consider a Bad Idea™. As I mentioned earlier, I think the concept of a "page" and "page delimiter" should be made more precise; then, it should be enough to correct `forward-page' (basically all other functions in page.el depend on it, directly or not). Currently Emacs seems to treat the _line_ as the page delimiter, but as the OP noted, this yields strange/unintuitive results with narrowing. And by the way, the patch the OP gave is also wrong, though in a different way. (I should have noticed that earlier.) The OP proposed this instead of (if (bolp) (forward-char 1)): (if (string= page-delimiter "") (forward-char 1)) Of course, this condition should never be true: if `page-delimiter' is "", functions from page.el will most probably never work correctly anyway. What (maybe) should have been tested would be (eq (match-beginning 0) (match-end 0)) but anyway, since Emacs regex engine does not have a lot of zero-width assertions, this is not going to happen very often anyway (certainly never with the default value of `page-delimiter', which explains why the OP hasn't noticed any problems with his patch). One possible value of `page-delimiter' that comes to my mind which could lead to the above condition holding would be "^$" -- though I can hardly see any practical use for it. So my proposal would be to just delete the offending line altogether. I'd be very surprised if we heard any complaints afterwards. BTW, the analogous code for moving back one page seems also suspicious to me. I'll look into it tomorrow. > Thanks. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 27 03:53:43 2016 Received: (at 20663) by debbugs.gnu.org; 27 Apr 2016 07:53:43 +0000 Received: from localhost ([127.0.0.1]:49366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avKI3-0005Xn-J5 for submit@debbugs.gnu.org; Wed, 27 Apr 2016 03:53:43 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:35102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avKI1-0005Xa-V7 for 20663@debbugs.gnu.org; Wed, 27 Apr 2016 03:53:42 -0400 Received: by mail-pa0-f68.google.com with SMTP id zy2so4389594pac.2 for <20663@debbugs.gnu.org>; Wed, 27 Apr 2016 00:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XmOhl54LEDgLKXpiCn2r59FU47aAJiIuHdyW7MkSe6E=; b=PVVIcD8HLNznLB1JKFC20Xkfq040QTXCiRU06kjKEdcCQ9n2rx3dQPgPyDIyz32uJ1 thC5tpwGa7rRV1kNDBqG58Pz+N5GSKwrKc2uTOwfW5jUX4MC/nWMbDQbQlpUjHh/Z7Jt VbLEcK+/tdGePc+CM4szk98nbSbkHIVthTI4veyTsf3MTzTyHjaFDSUAmcS7s6oXWyr/ Yg2UhfL7i9iIoUHaPyx89n+4DMjhBCTH7GgIqmhF8j1nXQ7UdxQO1bfAfYc9YD6i3UJb ZhFUbbZJ5ECH8nUnl/JfPtB6/jHvlTHXl2vCSojV9KrjcotV9KMW5pbFS9xSqQKPiLay 6ayA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XmOhl54LEDgLKXpiCn2r59FU47aAJiIuHdyW7MkSe6E=; b=E1JsvGlYIMEAjcM4yE5BwfG2GgNYI3EO4aBbJM3MJDXcwcDqwRBL8KP+YtOROwwEce 8bXfUCEnCZf4CjTwBfpKdPfUIvG5A8t00Z+KAh9ghvGw6U3QYi0WMhrAXF/aDEmiE2vO yejfXTUk+UPa+AlaGEgzHvz/MMKJ76OvAX4CA4tcQ/7rge4Or8WK636bqqLmKR7NP1eQ 7uVQNrF7nGAGc947cTOrT0QyTETixgM7oWripmRYeuVED94RJE+bpVMavT9xd9ANaqF3 VmBNTKwmDyZXDpZgo/mz1DvJ4QVnTZwKq8Tftf6oqhl1cTQeg+OZ1nuBgoRpB072kDfw eF3g== X-Gm-Message-State: AOPr4FVYSbWGmqVEbh+OH6H4YVMjavQbuwqhfhF9nHFWK1sitrzxklIpSyYshLnDEayNEA== X-Received: by 10.66.246.165 with SMTP id xx5mr9726325pac.87.1461743616096; Wed, 27 Apr 2016 00:53:36 -0700 (PDT) Received: from gmail.com ([14.175.133.17]) by smtp.gmail.com with ESMTPSA id o81sm3921478pfj.50.2016.04.27.00.53.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 00:53:35 -0700 (PDT) Date: Wed, 27 Apr 2016 14:57:38 +0700 From: Pierre Neidhardt To: Marcin Borkowski Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages Message-ID: <20160427075738.GA2587@gmail.com> References: <87h9fbum2w.fsf@mbork.pl> <83h9fbhu0p.fsf@gnu.org> <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> <20160410012924.GA23097@gmail.com> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> <83shylbxqc.fsf@gnu.org> <871t607n1m.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871t607n1m.fsf@mbork.pl> X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: Eli Zaretskii , 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 16-04-20 09:32:37, Marcin Borkowski wrote: > And by the way, the patch the OP gave is also wrong, though in > a different way. (I should have noticed that earlier.) The OP proposed > this instead of (if (bolp) (forward-char 1)): > > (if (string= page-delimiter "") (forward-char 1)) > > Of course, this condition should never be true: if `page-delimiter' is > "", functions from page.el will most probably never work correctly > anyway. What (maybe) should have been tested would be > > (eq (match-beginning 0) (match-end 0)) > > but anyway, since Emacs regex engine does not have a lot of zero-width > assertions, this is not going to happen very often anyway (certainly > never with the default value of `page-delimiter', which explains why the > OP hasn't noticed any problems with his patch). One possible value of > `page-delimiter' that comes to my mind which could lead to the above > condition holding would be "^$" -- though I can hardly see any practical > use for it. > > So my proposal would be to just delete the offending line altogether. > I'd be very surprised if we heard any complaints afterwards. Why disallowing "^$" as a page delimiter? I would not use it either, but I can fathom that somebody else would. At the end of the day, the page display is like colors: a matter of taste. So instead of removing the line, I'd use the replacement you suggested. > BTW, the analogous code for moving back one page seems also suspicious > to me. I'll look into it tomorrow. The code for moving back first skips the page delimiter we are currently on, if any. This is not problematic if the page was narrowed down since it is not possible to be on the page delimiter at (point-min). The code looks good to me if we consider that the delimiters belong to the end of a page. -- Pierre Neidhardt From debbugs-submit-bounces@debbugs.gnu.org Mon May 02 16:42:33 2016 Received: (at 20663) by debbugs.gnu.org; 2 May 2016 20:42:33 +0000 Received: from localhost ([127.0.0.1]:34236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axKfp-0006Al-90 for submit@debbugs.gnu.org; Mon, 02 May 2016 16:42:33 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:55682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axKfn-0006Ad-GU for 20663@debbugs.gnu.org; Mon, 02 May 2016 16:42:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 6A23EB2B92A; Mon, 2 May 2016 22:42:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 3QX1KN+FAepM; Mon, 2 May 2016 22:42:27 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id D26C2B2B928; Mon, 2 May 2016 22:42:26 +0200 (CEST) References: <87h9fbum2w.fsf@mbork.pl> <83h9fbhu0p.fsf@gnu.org> <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> <20160410012924.GA23097@gmail.com> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> <83shylbxqc.fsf@gnu.org> <871t607n1m.fsf@mbork.pl> <20160427075738.GA2587@gmail.com> User-agent: mu4e 0.9.13; emacs 25.1.50.9 From: Marcin Borkowski To: Pierre Neidhardt Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages In-reply-to: <20160427075738.GA2587@gmail.com> Date: Mon, 02 May 2016 22:42:26 +0200 Message-ID: <87k2jcyyx9.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: Eli Zaretskii , 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-04-27, at 09:57, Pierre Neidhardt wrote: > On 16-04-20 09:32:37, Marcin Borkowski wrote: >> And by the way, the patch the OP gave is also wrong, though in >> a different way. (I should have noticed that earlier.) The OP proposed >> this instead of (if (bolp) (forward-char 1)): >> >> (if (string= page-delimiter "") (forward-char 1)) >> >> Of course, this condition should never be true: if `page-delimiter' is >> "", functions from page.el will most probably never work correctly >> anyway. What (maybe) should have been tested would be >> >> (eq (match-beginning 0) (match-end 0)) >> >> but anyway, since Emacs regex engine does not have a lot of zero-width >> assertions, this is not going to happen very often anyway (certainly >> never with the default value of `page-delimiter', which explains why the >> OP hasn't noticed any problems with his patch). One possible value of >> `page-delimiter' that comes to my mind which could lead to the above >> condition holding would be "^$" -- though I can hardly see any practical >> use for it. >> >> So my proposal would be to just delete the offending line altogether. >> I'd be very surprised if we heard any complaints afterwards. > > Why disallowing "^$" as a page delimiter? I would not use it either, but I can > fathom that somebody else would. At the end of the day, the page display is like > colors: a matter of taste. So instead of removing the line, I'd use the > replacement you suggested. I'm not saying it should be disallowed. I'm saying that most probably it's not very useful, and I'd be surprised if anyone used it. But I agree with your suggestion anyway, if only for aesthetical reasons. >> BTW, the analogous code for moving back one page seems also suspicious >> to me. I'll look into it tomorrow. > > The code for moving back first skips the page delimiter we are currently on, if > any. This is not problematic if the page was narrowed down since it is not > possible to be on the page delimiter at (point-min). > > The code looks good to me if we consider that the delimiters belong to the end > of a page. I'll try to look at them again. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 05:55:56 2016 Received: (at 20663) by debbugs.gnu.org; 4 Jun 2016 09:55:56 +0000 Received: from localhost ([127.0.0.1]:53734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b98JA-00064x-5Q for submit@debbugs.gnu.org; Sat, 04 Jun 2016 05:55:56 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b98J8-00064g-AD for 20663@debbugs.gnu.org; Sat, 04 Jun 2016 05:55:54 -0400 Received: by mail-wm0-f66.google.com with SMTP id a136so4542162wme.0 for <20663@debbugs.gnu.org>; Sat, 04 Jun 2016 02:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=glVjnt7Ndh7SL3awnV+0x51YfHLnZghhwEysQJ0YTKE=; b=YDCXAuUvDhdoxTVrNR6g+rbTuU3XWWtESBfUmn2hArsodMpxUbT/RUI1LnY3e46Qp5 my0QEtUOFAeBazAj0G8hYRbQoMq2OirfphehV8gZTZ+/Zhdu7JUbhHqfmbbk0Ss4Mlqr muvPd++4KtXizaDhbKOwqyahj9iz2bpemm1QSBcWENVROfQZhn92ZXwYA/MeYzlcY9x0 4RVy9m4DnSPmx+83UviBkVKLsbjw9F+CSprQqeKG2BfepmZOj8fVGAezAeO2F9K5Jv8t 48VqVqDkZe22vR/SGsCy0oXgzVzsYZaaVwELiAAQHlPpEf/ney6bmIBNgL1DwTF6jnuX NCKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=glVjnt7Ndh7SL3awnV+0x51YfHLnZghhwEysQJ0YTKE=; b=Kc6W+xfhd0Z3Czn69XyRrhEJeG0dgnNOKLjBhyys00IU04ibrWbluMhx1GsyurL3zH vLZZWglIJTXX776N1uVFK/LlbJv7o3nnQ8Hm96NJiNcbZyD5SPqKiTosLDvVdrBOM1C2 ipbY/TlJ1jDzt2i2B3716DbK821wDbMkDQ8pL0AW9YBJX3385gDS+b/qNlN1souM+th5 12pU49A/kbjFCq4gOf+RRi/LM58Jvt0LGnwjrr8azDy9KiiEjbHRgU8P3r9nfGz/N/IU LIKbCnPLk09TtkgzvwrjQEfGzHyFHfjvBQL9oLF/nfvKMN39TLBN8iD6Eiftao+gOFsN oBtw== X-Gm-Message-State: ALyK8tJOSs1+s1eZM9F3PojZ+ca5owEFh+m9WUvrotFGonDIRZtNIt4WucccvJD5yeVdMw== X-Received: by 10.28.25.129 with SMTP id 123mr3362807wmz.10.1465034148672; Sat, 04 Jun 2016 02:55:48 -0700 (PDT) Received: from gmail.com (185.64.4.93.rev.sfr.net. [93.4.64.185]) by smtp.gmail.com with ESMTPSA id c62sm3736909wmd.1.2016.06.04.02.55.47 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Jun 2016 02:55:48 -0700 (PDT) Date: Sat, 4 Jun 2016 11:55:53 +0200 From: Pierre Neidhardt To: Marcin Borkowski Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages Message-ID: <20160604095553.GB759@gmail.com> References: <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> <20160410012924.GA23097@gmail.com> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> <83shylbxqc.fsf@gnu.org> <871t607n1m.fsf@mbork.pl> <20160427075738.GA2587@gmail.com> <87k2jcyyx9.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k2jcyyx9.fsf@mbork.pl> X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: Eli Zaretskii , 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Any update? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 16:36:49 2016 Received: (at 20663) by debbugs.gnu.org; 4 Jun 2016 20:36:49 +0000 Received: from localhost ([127.0.0.1]:54643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9IJN-0004OG-JA for submit@debbugs.gnu.org; Sat, 04 Jun 2016 16:36:49 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:53032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9IJK-0004O5-85 for 20663@debbugs.gnu.org; Sat, 04 Jun 2016 16:36:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 5E64FBDC7DA; Sat, 4 Jun 2016 22:36:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu 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 ExljYFKjDmVJ; Sat, 4 Jun 2016 22:36:32 +0200 (CEST) Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 994ACBDC7D7; Sat, 4 Jun 2016 22:36:32 +0200 (CEST) References: <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> <20160410012924.GA23097@gmail.com> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> <83shylbxqc.fsf@gnu.org> <871t607n1m.fsf@mbork.pl> <20160427075738.GA2587@gmail.com> <87k2jcyyx9.fsf@mbork.pl> <20160604095553.GB759@gmail.com> User-agent: mu4e 0.9.16; emacs 25.1.50.3 From: Marcin Borkowski To: Pierre Neidhardt Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages In-reply-to: <20160604095553.GB759@gmail.com> Date: Sat, 04 Jun 2016 22:36:30 +0200 Message-ID: <8737osd73l.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2016-06-04, at 11:55, Pierre Neidhardt wrote: > Any update? Sorry, no; I don't have much time for Emacs bugs now. I'm still working on them, but very slowly; I'll get to this issue next (hopefully). Stay tuned. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 00:33:17 2019 Received: (at control) by debbugs.gnu.org; 16 Sep 2019 04:33:17 +0000 Received: from localhost ([127.0.0.1]:49027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9ihR-0002qJ-9E for submit@debbugs.gnu.org; Mon, 16 Sep 2019 00:33:17 -0400 Received: from mail-pg1-f178.google.com ([209.85.215.178]:33493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9ihO-0002q0-Sn for control@debbugs.gnu.org; Mon, 16 Sep 2019 00:33:15 -0400 Received: by mail-pg1-f178.google.com with SMTP id n190so19049356pgn.0 for ; Sun, 15 Sep 2019 21:33:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=P+RPLRCT1narKIuh/TEg/U+LHxzF8jwGavU6+clxNvA=; b=qWvtJkefDGmOmpkjs+2fuU2nxJPRnndApS15B400/BFm1EJbvUbJbKRoZjilPcr7Ab c0TY0bQDjPzIIY5VetbSin6d3wFnxfTSfiMIGMZYGaDp5M5wRl1/ZZyzR0k4bQrsHEe/ 1iBTkHVWrFjSdRP6I1Ai6dQ/bvOUfBl+YVgmPrYLDTbeSZUKo6v0da8p2iY5URgHshro 4dItdHBL37Gldr7k+VW4VjGxu2hhdg6AYNKaaksUTdRmWBwieBu4TP4EEKRlDjdQI8dx cSsPn6KmDwnCqwCy4asAoCVe/AQgvWCcRA9u90Q9Rq0lfFPNZ0KMg2R3luF71TOqxNJl mMdA== X-Gm-Message-State: APjAAAWsHq0IBFLQ4hoR7HCkQBvO7eRbcD8JOMIiLwbHmpWsrdmc2Z3F aaKILEOPntEB03MDHNImdvXTcpD9FIAtlqXhsyAmyUd0 X-Google-Smtp-Source: APXvYqzAP8XN48VPf1NNHXt9v06nQ/+duCjkzokyyI+LyxsM1nQkeZzce8Di0blEUZE0J84t9P95yTG2R5HsKfjKzqs= X-Received: by 2002:a17:90a:1150:: with SMTP id d16mr19194014pje.2.1568608388711; Sun, 15 Sep 2019 21:33:08 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Mon, 16 Sep 2019 06:32:57 +0200 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 20663 minor quit Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.215.178 listed in list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.178 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 20663 minor quit Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.178 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.215.178 listed in list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different severity 20663 minor quit From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 15 09:53:58 2020 Received: (at 20663) by debbugs.gnu.org; 15 Sep 2020 13:53:59 +0000 Received: from localhost ([127.0.0.1]:57798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIBPC-0004PA-Jk for submit@debbugs.gnu.org; Tue, 15 Sep 2020 09:53:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIBPA-0004Ou-Iy for 20663@debbugs.gnu.org; Tue, 15 Sep 2020 09:53:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nCqdriku7ZxvF0PO+auxvXJcDak4jU6vVINfz6J5L3c=; b=rJM4pG/ZmgsHnHPdrjkarqbxQQ uIzqgqmi+cCCpEGQirhePWtoa53LTqpzt85QGSlXuPpRpt7peuXE26hx4X7FCKqwFhoV1OLRr/mwG 8C0Au2zEZeDXRjx0KYYrGN7LoqH5X1M6qNw+yDNiHjS/uHe0FpAiMdRZICta1v0b7acM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIBP0-0000z6-8U; Tue, 15 Sep 2020 15:53:49 +0200 From: Lars Ingebrigtsen To: Marcin Borkowski Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages References: <871t6eve9c.fsf@mbork.pl> <837fg6injl.fsf@gnu.org> <20160410012924.GA23097@gmail.com> <87fuus30rs.fsf@mbork.pl> <8337qsgnvc.fsf@gnu.org> <87a8kxcs4k.fsf@mbork.pl> <83shylbxqc.fsf@gnu.org> <871t607n1m.fsf@mbork.pl> <20160427075738.GA2587@gmail.com> <87k2jcyyx9.fsf@mbork.pl> <20160604095553.GB759@gmail.com> <8737osd73l.fsf@mbork.pl> X-Now-Playing: Saito Koji's _433-1_: "433_031" Date: Tue, 15 Sep 2020 15:53:44 +0200 In-Reply-To: <8737osd73l.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 04 Jun 2016 22:36:30 +0200") Message-ID: <87363j87tj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Marcin Borkowski writes: > On 2016-06-04, at 11:55, Pierre Neidhardt wrote: > >> Any update? > > Sorry, no; I don't have much time for Emacs bugs now. I'm still working > on them, but very slowly; I'll ge [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Marcin Borkowski writes: > On 2016-06-04, at 11:55, Pierre Neidhardt wrote: > >> Any update? > > Sorry, no; I don't have much time for Emacs bugs now. I'm still working > on them, but very slowly; I'll get to this issue next (hopefully). Stay > tuned. (This was four years ago.) This bug is still present in Emacs 28 -- did you find any time to work on this problem some more? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 08:05:44 2022 Received: (at 20663) by debbugs.gnu.org; 22 Apr 2022 12:05:44 +0000 Received: from localhost ([127.0.0.1]:51816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhs2h-0007un-RG for submit@debbugs.gnu.org; Fri, 22 Apr 2022 08:05:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhs2g-0007uX-4W for 20663@debbugs.gnu.org; Fri, 22 Apr 2022 08:05:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+NoLV5h9TxgLirZg/7kiif1cqjDzelLYUU7KG0GfSKQ=; b=dwYtGabViQZcxtaFrqNVWLxQXF 4O6Ha+2Jzo/iC54qNW7RPF8boOKmSdRl1rfH1dcL0B/fcJSkmHXzmekjFDTVomDhSQkzd0HH8jAyR EnvFtmD9WQ8isl/Vt/6RWRVvsVZ7pp7y1Es+5qWxLpMjmZJJih4ft7ehrld40wjQ9EzA=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhs2X-00067I-BG; Fri, 22 Apr 2022 14:05:35 +0200 From: Lars Ingebrigtsen To: Pierre Neidhardt Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages References: <20150526171440.GG647@gmail.com> X-Now-Playing: How Strange (feat. Matanza's _How Strange_: "Acoustic Version)" Date: Fri, 22 Apr 2022 14:05:31 +0200 In-Reply-To: <20150526171440.GG647@gmail.com> (Pierre Neidhardt's message of "Tue, 26 May 2015 19:14:40 +0200") Message-ID: <877d7h2uic.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Pierre Neidhardt 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`: > > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Pierre Neidhardt 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. > > The attached patch fixes it by changing the code to actually match its > surrounding comments. (I'm going through old bug reports that unfortunately weren't resolved at the time.) I've now fixed this problem in a somewhat different way than originally suggested in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 08:05:48 2022 Received: (at control) by debbugs.gnu.org; 22 Apr 2022 12:05:48 +0000 Received: from localhost ([127.0.0.1]:51819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhs2m-0007v6-3C for submit@debbugs.gnu.org; Fri, 22 Apr 2022 08:05:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhs2j-0007ue-Pl for control@debbugs.gnu.org; Fri, 22 Apr 2022 08:05:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ah4DBwuJqw04A5s42yWb3Hm3SUkPcJ5ZDVPKwTUOLuA=; b=eHAi4Nj3onGIB6WCXsn5nn76IL O6dLvlihoVNei2+aMHafANPtw3ufl5C6TamuELOXoRIpAlTqLIFGrABM8H7nv8UQ/LULGytZBXB07 nZjwXEl/ImerYIBy2M4uJtKLMEnsYXoVw2BPFVpCsEcvUL+0XWDT9N1lR+NRLsnwNuLQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhs2b-00067Q-U6 for control@debbugs.gnu.org; Fri, 22 Apr 2022 14:05:39 +0200 Date: Fri, 22 Apr 2022 14:05:37 +0200 Message-Id: <875yn12ui6.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20663 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 20663 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 20663 29.1 quit From unknown Mon Aug 18 04:10:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 21 May 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 08 08:01:03 2022 Received: (at control) by debbugs.gnu.org; 8 Jun 2022 12:01:03 +0000 Received: from localhost ([127.0.0.1]:42664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyuMx-0003Rt-NM for submit@debbugs.gnu.org; Wed, 08 Jun 2022 08:01:03 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:38132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyuMu-0003RF-Sq for control@debbugs.gnu.org; Wed, 08 Jun 2022 08:01:02 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4LJ5Qr6mJMz9sSN for ; Wed, 8 Jun 2022 14:00:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kraus.my; s=MBO0001; t=1654689652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=2Qa11uggDVV+isV3ntE3dX9TwEHz1uruMfggcYCf7hE=; b=sA4+IaNMWpkHrAw4Kf+sot+OBa0rU96aOg00pdZFxmPcqfhTouaQe8e7FFgvDC+JQ+JS6D hQCkXQVt9s8UcLQJFicFD+RfDDO/xqOxYHIFJZ6i+LQx9crrYf5j1SvgUWKqNfSiVDk2sN cbUYa6zTogdMk8EgkLOmWy13E9169nPFnCTL7PVcf8z1S18SBWFUNu6P+fenUHyybihVbw Z3OJi3mNEtiPOU0bgjeKP5lvyRk3sQDOvaUde3Ohblm7zbOObiUJbfjwZBISqCsjVQjdFl +hFsdzi4h84iBci5n9RE/F2UGJ16V4V+GJyvslKC3x2CpOunXfbAyr1L9yX96g== From: Daniel Kraus To: control@debbugs.gnu.org Subject: unarchive 20663 Date: Wed, 08 Jun 2022 14:00:13 +0200 Message-ID: <87leu7e565.fsf@kraus.my> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4LJ5Qr6mJMz9sSN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) unarchive 20663 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 09 06:22:09 2022 Received: (at 20663) by debbugs.gnu.org; 9 Jun 2022 10:22:09 +0000 Received: from localhost ([127.0.0.1]:45058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzFIn-0001Rn-11 for submit@debbugs.gnu.org; Thu, 09 Jun 2022 06:22:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzFIk-0001RD-EQ for 20663@debbugs.gnu.org; Thu, 09 Jun 2022 06:22:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dwSc0r0Wr5ozQWeOeaS83Qe4ZhPYsQvS4mC79l/gxMI=; b=kgHDzQ2Lkh9nM7fhPLZNm/qRxV qkAAwo2dZlyMWskBURzyrXRBcxJW5RLKKrliIwVwzmpA+YA8S9KjiXdkaauVcD3rnlVpz09GG/4k5 TJV+X/riVLx6MsPmt0v0bmSu+FHi0H04LE0zp8rZJoOXRnxqw8aIVveBegnciNL+XvSw=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzFIa-0006H1-BE; Thu, 09 Jun 2022 12:21:58 +0200 From: Lars Ingebrigtsen To: Daniel Kraus Subject: Re: bug#20663: page.el (forward-page): Avoid skipping pages References: <20150526171440.GG647@gmail.com> <877d7h2uic.fsf@gnus.org> <87pmjje5mt.fsf@kraus.my> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEXCta2+sarFubG3 q6WwpZ6topupnpfNwLj///+vw1mlAAAAAWJLR0QIht6VegAAAAd0SU1FB+YGCQoNFStl92UAAAF1 SURBVDjLbVPJTQRBDLRNArYmAat5zBs1hLAhEAIJkP8DX+3pWdZaIabKt6sBGcZmMBQcQHBrWIMr M5fGoQ0bBBoeqhehBnm8iPh3mYDhan/QcGGwXwYIRK1EMYIyYBqR4dY2gnTtw4ixiN0EVufY3tHM gNV+EQ3mf+pDsOxLSK8cS2hfWm3lln/f2GWUu6tma3JS0pGVYJDG/mxoCfe7IYvcgP7yRBtnU5F2 9Fpt+K3ie48cBBdOebE4XhyNYzy6XT1aYXMl7/NtPuYnRyXx4rL28P7z/fXgukvWyDznb6VCYXQi k59j4asjXnXPTXLeube0qVfXUFCC3a9AjvoPnohKB7yrvYQLsatr8mddaRQMj/0Z3A70TwTIry+I rvZdvf1QgukvoOsF9cEVWuhUmuaSKxUxlg4iinqk4U8who066x342tNZ5ocToyRgiSmIY05jWm1j 9eT4lLq3R0YrKDNM2hhTd0cSXiXNmjFtNR4xmVP+ALMAQJrUEnDKAAAAJXRFWHRkYXRlOmNyZWF0 ZQAyMDIyLTA2LTA5VDEwOjEzOjIxKzAwOjAwMY8jwwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0w Ni0wOVQxMDoxMzoyMSswMDowMEDSm38AAAAASUVORK5CYII= X-Now-Playing: Massimo's _invalidObject Series (var)_: "function Jump() {" Date: Thu, 09 Jun 2022 12:21:55 +0200 In-Reply-To: <87pmjje5mt.fsf@kraus.my> (Daniel Kraus's message of "Wed, 08 Jun 2022 13:50:18 +0200") Message-ID: <87y1y687cs.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Daniel Kraus 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.tx [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20663 Cc: 20663@debbugs.gnu.org, Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Daniel Kraus 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 From unknown Mon Aug 18 04:10:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Jul 2022 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator