From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: "... the window start at a meaningless point within a line." Date: Mon, 19 Oct 2015 10:27:55 +0000 Message-ID: <20151019102755.GB2438@acm.fritz.box> References: <20151016181249.GC2779@acm.fritz.box> <837fmm65bl.fsf@gnu.org> <20151016201238.GD2779@acm.fritz.box> <83twpp51xz.fsf@gnu.org> <20151017115738.GA2522@acm.fritz.box> <83oafx4qsb.fsf@gnu.org> <83lhb14o6e.fsf@gnu.org> <83k2ql4lsy.fsf@gnu.org> <20151018150052.GD1639@acm.fritz.box> <83lhb0hy0h.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445250402 7352 80.91.229.3 (19 Oct 2015 10:26:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 10:26:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 12:26:33 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 1Zo7eA-0001ND-V8 for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 12:26:31 +0200 Original-Received: from localhost ([::1]:38067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo7e9-0007ez-VF for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 06:26:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo7e2-0007bj-U2 for emacs-devel@gnu.org; Mon, 19 Oct 2015 06:26:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo7dy-0001Z0-A6 for emacs-devel@gnu.org; Mon, 19 Oct 2015 06:26:22 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:36072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo7dy-0001Y5-0c for emacs-devel@gnu.org; Mon, 19 Oct 2015 06:26:18 -0400 Original-Received: (qmail 77810 invoked by uid 3782); 19 Oct 2015 10:26:16 -0000 Original-Received: from acm.muc.de (p5B14604F.dip0.t-ipconnect.de [91.20.96.79]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 19 Oct 2015 12:26:15 +0200 Original-Received: (qmail 3225 invoked by uid 1000); 19 Oct 2015 10:27:55 -0000 Content-Disposition: inline In-Reply-To: <83lhb0hy0h.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 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:192061 Archived-At: Hello, Eli. On Sun, Oct 18, 2015 at 08:44:46PM +0300, Eli Zaretskii wrote: > > Date: Sun, 18 Oct 2015 15:00:52 +0000 > > Cc: emacs-devel@gnu.org > > From: Alan Mackenzie > > > Another idea: did you try augmenting the X coordinate of the iterator > > > after it gets back to point at the beginning of Fvertical_motion? > > > IOW, after this line: > > > move_it_to (&it, > > > (!disp_string_at_start_p > > > || FETCH_BYTE (IT_BYTEPOS (it)) == '\n') > > > ? PT > > > : PT - 1, > > > -1, -1, -1, MOVE_TO_POS); > > > modify it.current_x such that it's relative to the "actual" > > > window-start. Then let Fvertical_motion do its job as usual. Did you > > > try that? > > No, I haven't. But I don't think it could work. After anchoring `it' > > at "actual" WS, it would have to move up or down. Any time the iterator > > is moved to a previous line, it re-anchors itself at a previous _xdisp_ > > BOL then moves forward, losing the relationship with WS. > > So this idea might work with nlines > 0, but couldn't work with nlines > > <= 0. > One bird at a time, okay? Could you please see if this idea works > with nlines > 0? If it does, it significantly simplifies the > solution, because we could do something very similar for moving > backward, i.e. apply the correction after each move to a previous > line. OK, I'll try that. Just give me a bit of time (I'm not as fast at coding as some people). > Thanks. -- Alan Mackenzie (Nuremberg, Germany).