bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55847: 29.0.50; line-number-at-pos ignores absolute parameter when c


From: Lars Ingebrigtsen
Subject: bug#55847: 29.0.50; line-number-at-pos ignores absolute parameter when checking position range
Date: Thu, 09 Jun 2022 12:46:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Antoine Kalmbach <ane@iki.fi> writes:

>    If the buffer is narrowed, the return value by default counts the lines
>    from the beginning of the accessible portion of the buffer.  But if the
>    second optional argument ABSOLUTE is non-nil, the value counts the lines
>    from the absolute start of the buffer, disregarding the narrowing.
>
> Hence I would assume that if absolute is non-nil the call to
> line-number-at-pos should work even if the buffer is narrowed, instead
> of throwing an error.

This says that it's counting lines from the absolute start of the
buffer, not that it's able to report data about positions outside of the
region.  I think that worked "by accident" in the old version of the
function.

However, this is a behavioural change from the previous version of the
function, so I think I'll adjust it to work as before. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]