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: "... the window start at a meaningless point within a line." Date: Sun, 18 Oct 2015 20:44:46 +0300 Message-ID: <83lhb0hy0h.fsf@gnu.org> References: <20151016095535.GA2779@acm.fritz.box> <83a8ri67jg.fsf@gnu.org> <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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445190327 12090 80.91.229.3 (18 Oct 2015 17:45:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 17:45:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 19:45:15 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 1Zns1B-0002Er-4d for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 19:45:13 +0200 Original-Received: from localhost ([::1]:34966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zns1A-0007wN-6W for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2015 13:45:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zns0p-0007wC-6q for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:44:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zns0m-0003I5-0g for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:44:51 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:48405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zns0l-0003Hw-Op for emacs-devel@gnu.org; Sun, 18 Oct 2015 13:44:47 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NWF00800FBHIC00@mtaout24.012.net.il> for emacs-devel@gnu.org; Sun, 18 Oct 2015 20:38:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWF004K2FNEL440@mtaout24.012.net.il>; Sun, 18 Oct 2015 20:38:02 +0300 (IDT) In-reply-to: <20151018150052.GD1639@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.180 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:191984 Archived-At: > 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. Thanks.