From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68215: Bug in what-page Date: Sat, 13 Jan 2024 12:10:24 +0200 Message-ID: <838r4th7cf.fsf@gnu.org> References: <83il46u7he.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29436"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68215-done@debbugs.gnu.org To: Lars Brinkhoff Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 13 11:11:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rOazB-0007US-9O for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jan 2024 11:11:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOayz-00015x-3W; Sat, 13 Jan 2024 05:11:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOayp-00011M-KH for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 05:11:08 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rOaym-0005PP-0d for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 05:11:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOayk-00067M-5x for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 05:11:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jan 2024 10:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68215 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 68215@debbugs.gnu.org, eliz@gnu.org, lars.brinkhoff@gmail.com Original-Received: via spool by 68215-done@debbugs.gnu.org id=D68215.170514066123504 (code D ref 68215); Sat, 13 Jan 2024 10:11:01 +0000 Original-Received: (at 68215-done) by debbugs.gnu.org; 13 Jan 2024 10:11:01 +0000 Original-Received: from localhost ([127.0.0.1]:38492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOayi-000671-Py for submit@debbugs.gnu.org; Sat, 13 Jan 2024 05:11:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOaye-00066h-2A for 68215-done@debbugs.gnu.org; Sat, 13 Jan 2024 05:10:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOayT-0005H4-6I; Sat, 13 Jan 2024 05:10:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ia/oGgHvfB4C355HCDSaCD9/m8+GW9jreZflJ20Rq7A=; b=ovT136c2VnFV ImzqcNgdpxt9Uo9VI3jcV1iSu6msgpiTjpA4wJBpuijdoN7J93LRSSAHOzPspFoZbOHNFJt18UjPO MxeOY7EPVpvBpmXbmh50n0iAdvenqXwpa1tT7sUdAW50nbgbdHgpkJb+ujR54hmingGXAY3INWbiR +tddpMgE8sPSaDdbRG3xyVT7hk1OwucKmYd8vn+7ifyUYAe7jlDshkWfkBRqIVaNjBdOPpJ4n/+m4 0QAvyYs2CJCA3nGezGoIepwiIN8hVKVA7zdvkIXqD9Tg9Ci1xz45ufaDEsB3gyuLZt0G17LghDLKe a6MP7P4KWTEeATxVHWVRuQ==; In-Reply-To: (message from Lars Brinkhoff on Thu, 11 Jan 2024 14:49:58 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278116 Archived-At: > From: Lars Brinkhoff > Date: Thu, 11 Jan 2024 14:49:58 +0100 > Cc: 68215@debbugs.gnu.org > > Eli Zaretskii wrote: > > It should be a simple matter to countermand this special-casing in > > what-page, while still using count-lines. Or am I missing something? > > That's probably better. I'm attaching an updated patch which uses > count-lines instead. It countermands the special case by checking > (bolp) and then doing the opposite adjustment. > > However, there's one more case to consider: when point starts out > right after a page delimiter (i.e. the very first positon on a page), > the page--what-page while loop will leave the final point there too, > and then count-lines will return 0. The line number should be 1, so > an adjustment is needed there too. > > The updated test is the same as the previous round, and they still > pass with the new patch. > > > > + "Return a list of the page number of point, and the line number > > > +within that page." > > > > Our convention is to have the first line of a doc string be a single > > complete sentence. > > Fixed by moving info to a second line, or rephrasing to one line. Thanks, installed on the master branch, and closing the bug.