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

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

Re: How to get the number of displayed line the point is in?


From: tomas
Subject: Re: How to get the number of displayed line the point is in?
Date: Sun, 3 Jun 2018 09:41:59 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Jun 03, 2018 at 05:58:07AM +0200, Marcin Borkowski wrote:
> Hi all,
> 
> as in the subject.  I want to know how far the point is from the top of
> the screen.  (What I actually need to do is to inert something in the
> current buffer in such a position so that it appears precisely on the
> last visible line.)

Is it some combination of `line-number-at-pos' and `window-start'  what
you are looking for?

Besides the section on "Window Start and End Positions" in the elisp
manual could be a source of inspiration.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsTm8cACgkQBcgs9XrR2ka/zACfb58gySBpVVcZyp/HifiVuUYN
R9sAmwYEDswq9Ws2UkNTFU+9BY6b2a+P
=6wv0
-----END PGP SIGNATURE-----



reply via email to

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