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: need option so line-move-to-column ignores fields, plus patch Date: Sun, 24 Sep 2006 18:04:55 -0400 Message-ID: <87zmcokjjs.fsf@stupidchicken.com> References: <2cd46e7f0608310848l743430e9ia7a1d45e22428083@mail.gmail.com> <2cd46e7f0608312339s16a2a101p8c30840bbdeb0d22@mail.gmail.com> <2cd46e7f0609032143v311b670dra2d2ef679dd936@mail.gmail.com> <2cd46e7f0609041256q73c0c0d3s7631a964ae9a8367@mail.gmail.com> <2cd46e7f0609060952m54601787x8c91412af7fbf69f@mail.gmail.com> <2cd46e7f0609070747o5028d2bewd5a9e79a5afd4a46@mail.gmail.com> <2cd46e7f0609231629hf2187cbl7e46507ee6070422@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1159135389 7384 80.91.229.2 (24 Sep 2006 22:03:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Sep 2006 22:03:09 +0000 (UTC) Cc: Ken Manheimer , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 25 00:03:06 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GRc3v-0003Xn-KM for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2006 00:03:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRc3v-0000Ma-93 for ged-emacs-devel@m.gmane.org; Sun, 24 Sep 2006 18:02:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GRc3k-0000JK-1k for emacs-devel@gnu.org; Sun, 24 Sep 2006 18:02:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GRc3i-0000Io-Kq for emacs-devel@gnu.org; Sun, 24 Sep 2006 18:02:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRc3i-0000Il-El for emacs-devel@gnu.org; Sun, 24 Sep 2006 18:02:46 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GRc7y-00014b-Jf; Sun, 24 Sep 2006 18:07:10 -0400 Original-Received: by cyd (Postfix, from userid 1000) id EEC004E411; Sun, 24 Sep 2006 18:04:55 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun\, 24 Sep 2006 12\:28\:30 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:60177 Archived-At: Richard Stallman writes: > | 1. With the cursor adjacent to the right of any bar, > | if you move forwards a line (^N), the cursor slips to column 0. > | 2. Moving backwards (^P) with the cursor in the same place, however, > | doesn't have this problem - it sticks near the boundary. > > #1 is clearly a bug. C-n should be symmetrical with C-p. I don't see where else the cursor can possibly go in #1. The logic of line-move is like this: "Try to naively move the cursor vertically down. If this moves us into a new field, go instead to the beginning of the field (if going forward) or the end of the field (if going backward)." In #1, the "naive" motion moves the cursor into a new field, so it shouldn't move to the old column; instead, it moves into the beginning of the field. The C-p behavior is also correct. The situation actually is symmetric, but subtle. When the cursor moves backwards, and finds itself in a new field, it moves to the *end* of that field. When the field boundaries are arranged as | | | the logical behavior implies that the cursor should stick near the boundary. Spontaneous symmetry breaking! > | 4. Forwards with the cursor on or to the bar's left leaves it in column 0. > > That is a bug. It should be sticky except staying to the left of the bar. Same here---the cursor is moving into a new field. I have checked in a fix to improve column motion in certain other situations.