From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#35943: 26.2; `count-lines-page' gives wrong line count (off by one) Date: Tue, 28 May 2019 14:40:11 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="140193"; mail-complaints-to="usenet@blaine.gmane.org" To: 35943@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 28 14:41:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVbPi-000aLW-Rp for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 May 2019 14:41:10 +0200 Original-Received: from localhost ([127.0.0.1]:34127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVbPh-0001o1-SG for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 May 2019 08:41:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVbPb-0001mj-6k for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVbPa-0008Ih-8z for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41693) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVbPa-0008Ic-6l for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hVbPa-000496-34 for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 May 2019 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35943 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155904723715891 (code B ref -1); Tue, 28 May 2019 12:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2019 12:40:37 +0000 Original-Received: from localhost ([127.0.0.1]:55237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hVbPA-00048F-Rs for submit@debbugs.gnu.org; Tue, 28 May 2019 08:40:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hVbP5-00047n-CT for submit@debbugs.gnu.org; Tue, 28 May 2019 08:40:33 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVbP0-00082V-7d for submit@debbugs.gnu.org; Tue, 28 May 2019 08:40:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVbOz-0001jf-9r for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:40:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVbOy-00080b-EA for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:40:25 -0400 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:35542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVbOy-0007zx-9H for bug-gnu-emacs@gnu.org; Tue, 28 May 2019 08:40:24 -0400 Original-Received: by mail-wr1-f45.google.com with SMTP id m3so20068196wrv.2 for ; Tue, 28 May 2019 05:40:24 -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=ju9wmUDWnE4b+esJCl4n0wRyVi00aDL36PIpfAlonxs=; b=bUMJz4iri+qYehUiXU3H3DMrmUqfvjpZZIS5916a84XwFCcJq7FWFmENn8V6O72Erg RePFRP0XrSASPZ3hTy/LSbTLgDicMA1ba448Z8tvMkwhceBEnL2pEheoG1OqYMj6uJcD InOAymy4skzE69NEcKts6FxguJL4Wc4K73MFwbc0KCorQrwCQUN4pK64C/Q7XmmCOdZJ WLSztuoqrWgHpKBW8WiA+N+5NNX6CUKeD1jdj+OsDOYxrPo66msV1U++oPsiHgjUP92o bw8xhIfHL20C0XpJQtu4+o0zVNCSZSutL21CS4mjeSfqlUSdsTXUM0nmfAaBIt0CweOm 2DPw== X-Gm-Message-State: APjAAAURJDBu6UzUZTgCIoFk9V+V26tHd79+Lx7JalxEsknMcN1LFg9n Y6t2RADKBAHtYQ3HE1rzXHCnDtQ7LfJ4hpIH2MEFyQ== X-Google-Smtp-Source: APXvYqxhRnKe3BxSW6mZLJrAReeDtPArRHq5YsFmQ3dEr7TIJfXTtCAKM3/N3SEkqELdI//5NP5EE1aRBfnmAYacDgw= X-Received: by 2002:adf:e482:: with SMTP id i2mr7972640wrm.85.1559047222983; Tue, 28 May 2019 05:40:22 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: 209.51.188.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:159846 Archived-At: There seems to be an off by one error in `count-lines-page'. Steps to reproduce: 1. Run emacs -Q 2. Evaluate the following in the scratch buffer: (with-temp-buffer (insert "Page 1/3 ^L Page 2/3 ^L Page 3/3") (forward-page) (count-lines-page)) NB. Convert "^L" to the actual control characters. 3. Result: "Page has 2 lines (2 + 0)" 4. Expected result: "Page has 1 lines (1 + 0)" Thanks, Stefan Kangas In GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2019-04-13 built on joffe Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9.9 (stretch)