all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: 35943@debbugs.gnu.org
Subject: bug#35943: 26.2; `count-lines-page' gives wrong line count (off by one)
Date: Tue, 28 May 2019 08:49:51 -0400	[thread overview]
Message-ID: <87lfyq7ngw.fsf@gmail.com> (raw)
In-Reply-To: <CADwFkmmN0CO1cMLyPzq-KSKyyg9Yc8pEeGwrn-y42chMOEK58Q@mail.gmail.com> (Stefan Kangas's message of "Tue, 28 May 2019 14:40:11 +0200")

Stefan Kangas <stefan@marxist.se> writes:

> NB. Convert "^L" to the actual control characters.

You can use "\C-l" for this.

> 3. Result:
>
> "Page has 2 lines (2 + 0)"
>
> 4. Expected result:
>
> "Page has 1 lines (1 + 0)"

The page starts right after the page separator, so with some more annotation:

(with-temp-buffer
  (insert "Page 1/3 line 1
\C-l page 2, line 1
Page 2/3, line 2
\C-l, page 3, line 1
Page 3/3, line 2")
  (forward-page)
  (count-lines-page))

You can see that pages 2 and 3 both have two lines.






  reply	other threads:[~2019-05-28 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 12:40 bug#35943: 26.2; `count-lines-page' gives wrong line count (off by one) Stefan Kangas
2019-05-28 12:49 ` Noam Postavsky [this message]
2019-05-29  8:43   ` Stefan Kangas
2019-05-29 11:17     ` Noam Postavsky
2019-05-29 11:41       ` Stefan Kangas
2019-05-29 13:50       ` Drew Adams
2019-05-28 20:25 ` Juri Linkov
2019-05-29  9:40   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfyq7ngw.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=35943@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.