all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <83twqb9h26.fsf@gnu.org> (raw)
In-Reply-To: <20150930102231.GB6672@acm.fritz.box>

> Date: Wed, 30 Sep 2015 10:22:31 +0000
> From: Alan Mackenzie <acm@muc.de>
> Cc: emacs-devel@gnu.org
> 
> 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.



      parent reply	other threads:[~2015-10-01  7:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 10:40 (pos-visible-in-window-p t nil t) returns wrong position/is suboptimally documented Alan Mackenzie
2015-09-27 11:06 ` Eli Zaretskii
2015-09-30  7:21   ` Eli Zaretskii
2015-09-30  8:56     ` Alan Mackenzie
2015-09-30  9:32       ` Eli Zaretskii
2015-09-30 10:22         ` Alan Mackenzie
2015-09-30 13:52           ` Eli Zaretskii
2015-09-30 14:05             ` Alan Mackenzie
2015-10-01  7:36           ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83twqb9h26.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.