emacs-devel
[Top][All Lists]
Advanced

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

Re: (pos-visible-in-window-p t nil t) returns wrong position/is suboptim


From: Eli Zaretskii
Subject: Re: (pos-visible-in-window-p t nil t) returns wrong position/is suboptimally documented.
Date: Wed, 30 Sep 2015 12:32:39 +0300

> Date: Wed, 30 Sep 2015 08:56:11 +0000
> Cc: address@hidden
> From: Alan Mackenzie <address@hidden>
> 
>     "If POSITION is `t', that means to check the first visible position
>      of the last visible screen line in WINDOW."
> 
> doesn't seem quite right.  If the text in the window is scrolled such
> that EOB is in the middle of the window, POSITION t gives the
> coordinates of the last line containing text, not the last visible
> screen line.

You mean, it isn't clear that "screen line" means line with text?  I
could add "with text" if that's the issue (I thought it was obvious).

> How about something like:
> 
>     "If POSITION is `t', that means to check the first visible position
>     of the last visible screen line in WINDOW which is at or above the
>     end of the window's buffer."

Too complex, IMO.  It took me 4 readings to understand what you mean,
and that's _after_ I've read the description of the situation you were
taking about.

> However 2: I think there's a bug in the functionality, too.  If there is
>   o - a text buffer
>   o - with no terminating LF on its last line, and
>   o - that last line is above the window's last line
> then (pos-visible-in-window t nil t) returns the coordinates of the last
> lines's EOL.  This is the case in both a Linux virtual terminal and an X
> windows session.

It's not a bug.  If you think it's important to mention this marginal
use case, I can add that, too.



reply via email to

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