From: Chong Yidong <cyd@stupidchicken.com>
To: rms@gnu.org
Cc: David Reitter <david.reitter@gmail.com>, emacs-devel@gnu.org
Subject: Re: pos-visible-in-window-p at ellipsis
Date: Tue, 15 Jan 2008 10:15:37 -0500 [thread overview]
Message-ID: <87sl0zunl2.fsf@stupidchicken.com> (raw)
In-Reply-To: <E1J7t09-0006cP-NX@fencepost.gnu.org> (Richard Stallman's message of "Fri\, 11 Jan 2008 08\:58\:26 -0500")
Richard Stallman <rms@gnu.org> writes:
> Start an emacs -Q , presumably in as non-TTY (tested with the Carbon
> port)
>
> M-x latex-mode
> M-x outline-minor-mode
>
> Enter the following text into the buffer
>
> \section{heading}
> this is a sentence.
>
> M-x hide-subtree
> You should now see this:
>
> \section{heading}...
>
> Place the point at the ellipsis (...) and enter
>
> M-: (pos-visible-in-window-p (point) nil 'partial) RET
>
> Now hit C-f to place the point right after the ellipsis, and enter
>
> M-: (pos-visible-in-window-p (point) nil 'partial) RET
>
> The bug is that both `pos-visible-in-window-p' returns the same pixel
> coordinates at both positions. According to the doc, " X and Y are
> the pixel coordinates relative to the top left corner of the window.",
> and I presume this refers to the coordinates of whatever the point is
> on.
This happens because the pixel position reported by pos_visible_p can
overshoot when there is invisible text (see the comment in
xdisp.c:1321). It would be rather complicated to compensate for this
(and potentially buggy since pos_visible_p is used by many other
functions). I think we should simply change the documentation of
pos-visible-in-window-p to say that the pixel positions may not be
accurate when there is invisible text at the specified position.
next prev parent reply other threads:[~2008-01-15 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-23 19:19 pos-visible-in-window-p at ellipsis David Reitter
2007-12-27 13:42 ` Richard Stallman
2008-01-15 15:15 ` Chong Yidong [this message]
2008-01-15 23:26 ` Kim F. Storm
2008-01-17 14:10 ` Richard Stallman
2008-01-17 14:59 ` Chong Yidong
2008-01-26 1:00 ` Chong Yidong
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=87sl0zunl2.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=david.reitter@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rms@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.