From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: xdisp.c's struct it questions. Date: Sat, 03 Oct 2015 19:09:09 +0300 Message-ID: <83r3lc2au2.fsf@gnu.org> References: <20151003154835.GA4509@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443888586 23433 80.91.229.3 (3 Oct 2015 16:09:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Oct 2015 16:09:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 03 18:09:37 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZiPNM-0006nV-Kp for ged-emacs-devel@m.gmane.org; Sat, 03 Oct 2015 18:09:32 +0200 Original-Received: from localhost ([::1]:39127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiPNL-0000yT-VR for ged-emacs-devel@m.gmane.org; Sat, 03 Oct 2015 12:09:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiPNI-0000w9-Gd for emacs-devel@gnu.org; Sat, 03 Oct 2015 12:09:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiPNE-0002Vz-Gf for emacs-devel@gnu.org; Sat, 03 Oct 2015 12:09:28 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:33611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiPNE-0002UN-9r for emacs-devel@gnu.org; Sat, 03 Oct 2015 12:09:24 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NVN00L00JF5MC00@mtaout28.012.net.il> for emacs-devel@gnu.org; Sat, 03 Oct 2015 19:08:57 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVN00PR6JIX3H80@mtaout28.012.net.il>; Sat, 03 Oct 2015 19:08:57 +0300 (IDT) In-reply-to: <20151003154835.GA4509@acm.fritz.box> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190794 Archived-At: > Date: Sat, 3 Oct 2015 15:48:36 +0000 > From: Alan Mackenzie > > I'm trying to get some stuff in xdisp.c working. It's hard. My sympathies. Please consider recording in the comments everything you learn that isn't already there. Let's take something positive and useful from your ordeal ;-) > I'm currently looking at routines like `move_it_to', which is described > as "Move IT forward until it satisfies one or more of the criteria in > TO_CHARPOS, TO_X, TO_Y, and TO_VPOS." > > What I can't find anywhere is a description of what it means for a > "struct it" to _be_ somewhere. There are around 100 fields in struct > it, and several of them record locations, coordinates, etc., in one way > and another. Which of these fields are changed when move_it_to is > called? It depends on the criteria. For TO_CHARPOS, the goal value is in it->pos.charpos; for TO_X, it's in it->current_x; for TO_Y, it's in it->current_y; and for TO_VPOS, it's in it->vpos. Also note that the criteria is actually tested to "reach or exceed" the goal values, i.e. do not expect to always get an exact equality, only "greater or equal".