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: Thu, 01 Oct 2015 10:36:01 +0300

> Date: Wed, 30 Sep 2015 10:22:31 +0000
> From: Alan Mackenzie <address@hidden>
> Cc: address@hidden
> 
> Hello, Eli.
> 
> > > 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.
> 
> OK, it's deliberate.  It's a touch puzzling, though.

To understand it, you need to keep in mind that this function
considers only the vertical dimension; the horizontal dimensions you
get are the side effect.  In particular when POS is t, the function
tries to get to the largest Y coordinate visible in the window; once
it gets there, it just reports where that is.



reply via email to

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