From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#971: 23.0.60; next-line, previous-line and goal-column Date: Fri, 16 Sep 2011 12:38:35 +0300 Message-ID: <83k498vnc4.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1316165975 24261 80.91.229.12 (16 Sep 2011 09:39:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2011 09:39:35 +0000 (UTC) Cc: 971@debbugs.gnu.org, Roland.Winkler@physik.uni-erlangen.de To: Lars Magne Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 16 11:39:30 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4UtM-0000u0-Pm for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Sep 2011 11:39:28 +0200 Original-Received: from localhost ([::1]:58545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4UtJ-0003Nr-HN for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Sep 2011 05:39:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4UtH-0003NJ-0O for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2011 05:39:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4UtD-0005nn-N3 for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2011 05:39:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4UtD-0005nf-KH for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2011 05:39:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R4Uxm-0003HH-5S; Fri, 16 Sep 2011 05:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Sep 2011 09:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 971-submit@debbugs.gnu.org id=B971.131616620112539 (code B ref 971); Fri, 16 Sep 2011 09:44:02 +0000 Original-Received: (at 971) by debbugs.gnu.org; 16 Sep 2011 09:43:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4Ux6-0003GC-O6 for submit@debbugs.gnu.org; Fri, 16 Sep 2011 05:43:20 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4Ux3-0003G3-IY for 971@debbugs.gnu.org; Fri, 16 Sep 2011 05:43:18 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LRL00H00ZY4DV00@a-mtaout23.012.net.il> for 971@debbugs.gnu.org; Fri, 16 Sep 2011 12:38:33 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.126.9.62]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LRM00DD1048GY40@a-mtaout23.012.net.il>; Fri, 16 Sep 2011 12:38:33 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 16 Sep 2011 05:44:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51217 Archived-At: > From: Lars Magne Ingebrigtsen > Date: Sun, 11 Sep 2011 19:48:48 +0200 > Cc: 971@debbugs.gnu.org >=20 > "Roland Winkler" writes: >=20 > > When goal-column has a value larger than the window width, next l= ine > > and previous-line behave oddly. Visit file foo.txt, choose a wind= ow > > width of, say, 40, and set goal-column to 50. If initially point = is > > at the beginning of line, next-line and previous-line put point i= n a > > column smaller than goal-column. Executing next-line again puts > > point at the end of the line past goal-column. =20 >=20 > I can verify that this bug still exists in Emacs 24. This happens because the (now default) line-move-visual operation of next-line is fundamentally incompatible with a non-nil setting of goal-column, when the window with is smaller than goal-column's value= . If you reset line-move-visual to nil, the problem disappears. line-move-visual (the function) tries to support goal-column, but in = a manner that cannot possibly work when we move by visual lines (as opposed to logical lines) and the window is too narrow, because visua= l lines simply don't have pixel coordinates that correspond to goal-column in this case. So it does the best it can: move to the en= d of the visual line. An easy way of solving this is dropping support for goal-column when line-move-visual is non-nil. If that's unacceptable, Someone=E2=84= =A2 will have to come up with a specification for what Emacs should do in this use case, because I cannot think of any reasonable behavior.