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: Tue, 15 Jan 2008 10:15:37 -0500 Message-ID: <87sl0zunl2.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 1200410440 14180 80.91.229.12 (15 Jan 2008 15:20:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2008 15:20:40 +0000 (UTC) Cc: David Reitter , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 15 16:21:00 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 1JEnb0-00032j-ED for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2008 16:20:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEnaa-000543-Vy for ged-emacs-devel@m.gmane.org; Tue, 15 Jan 2008 10:20:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEnaT-00052R-Mu for emacs-devel@gnu.org; Tue, 15 Jan 2008 10:20:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEnaR-00051Z-IW for emacs-devel@gnu.org; Tue, 15 Jan 2008 10:20:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEnaR-00051S-2s for emacs-devel@gnu.org; Tue, 15 Jan 2008 10:20:23 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEnaN-0000Ne-Dx; Tue, 15 Jan 2008 10:20:19 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 878374E3F9; Tue, 15 Jan 2008 10:15:37 -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:86935 Archived-At: Richard Stallman 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.