emacs-devel
[Top][All Lists]
Advanced

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

Re: pos-visible-in-window-p at ellipsis


From: Chong Yidong
Subject: Re: pos-visible-in-window-p at ellipsis
Date: Tue, 15 Jan 2008 10:15:37 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Richard Stallman <address@hidden> 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.




reply via email to

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