emacs-devel
[Top][All Lists]
Advanced

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

Re: line-start?


From: Bastien
Subject: Re: line-start?
Date: Fri, 07 Feb 2020 07:42:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Eli,

Eli Zaretskii <address@hidden> writes:

> If you need a buffer position of the first (leftmost) visible
> character, then I think you want this instead:
>
>   (nth 1 (posn-at-x-y 0 (cdr (posn-x-y (posn-at-point)))))

Thanks a lot -- this is indeed more precise.  (window-hscroll)
does not handle rescaled text very well, whereas this solution
does.

However, when the cursor is right under the header-line, the
expression above returns 'header-line, so I could not use it
for my purpose.

Also, the same expression returns 'header-line when the cursor
is on the _second_ line below the 'header-line -- I haven't
looked for why it does so, but if it is reproducible, maybe
there is something inconsistent here.

Thanks again anyway!

-- 
 Bastien



reply via email to

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