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: Alan Mackenzie
Subject: Re: (pos-visible-in-window-p t nil t) returns wrong position/is suboptimally documented.
Date: Wed, 30 Sep 2015 14:05:59 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Eli.

On Wed, Sep 30, 2015 at 04:52:24PM +0300, Eli Zaretskii wrote:
> > Date: Wed, 30 Sep 2015 10:22:31 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>

> > > > 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.  I should grep the
> > elisp sources to find out what it's for.  I do think it should be
> > mentioned in the doc, even if only for preventing somebody like me
> > raising a spurious bug report in the future.

> > How about expressing the piece of documentation as:

> >     "If POSITION is `t', that means to check the position the first
> >     visible position of the last visible screen line with text in
> >     WINDOW; but if the end of the window's buffer is on the window, this
> >     position is used instead."

> I already committed a change to describe that.  The doc string now
> says

>   If POS is t, it specifies either the first position displayed on the
>   last visible screen line in WINDOW, or the end-of-buffer position,
>   whichever comes first.

> and similar text is in the ELisp manual.

> OK?

Very much OK!  Thanks.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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