Returns the line number of the line containing a given position. Lines are numbered starting with 0.
Calling this method may force the recalculation of location information if a maximum width is set for the buffer, even if the buffer currently has delayed refreshing (see refresh-delayed?). If the buffer is not viewed (see Basic Organization) and a maximum width is set for the buffer, this method ignores the maximum width if the buffer has never been viewed, otherwise using the line breaks from the most recent view of the buffer (unadjusted by any insertions or deletions).
See End of Line for a discussion of at-eol?.