From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: pos-visible-in-window-p at ellipsis Date: Fri, 25 Jan 2008 20:00:30 -0500 Message-ID: <873asl2yfl.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201309571 19698 80.91.229.12 (26 Jan 2008 01:06:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jan 2008 01:06:11 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 26 02:06:30 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JIZUs-0008Bg-Kw for ged-emacs-devel@m.gmane.org; Sat, 26 Jan 2008 02:06:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIZUS-0000hB-AN for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 20:05:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIZUO-0000gR-2f for emacs-devel@gnu.org; Fri, 25 Jan 2008 20:05:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIZUN-0000gF-E8 for emacs-devel@gnu.org; Fri, 25 Jan 2008 20:05:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIZUN-0000gC-BT for emacs-devel@gnu.org; Fri, 25 Jan 2008 20:05:43 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIZUJ-0003dh-HQ; Fri, 25 Jan 2008 20:05:39 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id C05974E3D5; Fri, 25 Jan 2008 20:00:30 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Fri\, 11 Jan 2008 08\:58\:26 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87534 Archived-At: > 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.)