[Top][All Lists]

[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: Fri, 25 Jan 2008 20:00:30 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> 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 is practically relevant because I'm using that function to  
> position the point in just the right place (i.e. maintain horizontal  
> pixel position) when a user goes up or down a line (and C-n etc  
> doesn't do that.)

I've checked in a fix for this into the trunk; please see if it works
for you there.

(I've asked to wait till after 22.2 to backport this fix into the
branch, and RMS has agreed.)

reply via email to

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