From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: move-beginning-of-line misbehaves on wrapped-line invisible text - recent cvs checkout Date: Thu, 19 Jan 2006 12:45:06 -0500 Message-ID: References: <2cd46e7f0601121612y386d057ft68324aeb352b777d@mail.gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1137702637 4595 80.91.229.2 (19 Jan 2006 20:30:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 20:30:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 19 21:30:29 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 1EzgQ1-0002Ja-3U for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2006 21:30:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzgSS-0005AG-Cy for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2006 15:32:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ezdw2-0006Js-Iw for emacs-devel@gnu.org; Thu, 19 Jan 2006 12:50:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ezdw0-0006JG-VG for emacs-devel@gnu.org; Thu, 19 Jan 2006 12:50:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ezdvz-0006Is-74 for emacs-devel@gnu.org; Thu, 19 Jan 2006 12:50:56 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Eze03-0002CG-LC for emacs-devel@gnu.org; Thu, 19 Jan 2006 12:55:07 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EzdqM-0008Mu-Ta; Thu, 19 Jan 2006 12:45:06 -0500 Original-To: Ken Manheimer In-reply-to: <2cd46e7f0601121612y386d057ft68324aeb352b777d@mail.gmail.com> (message from Ken Manheimer on Thu, 12 Jan 2006 19:12:39 -0500) 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:49268 Archived-At: move-beginning-of-line is supposed to move to the beginning of the current _display_ line. emphasis on "display" is because i'm not quite clear what it means. I believe the idea is that newlines that don't really appear as such do not count. I don't see the problems you reported with the medium-size lines, but I do see the problem with the longest line. This seems to fix it. Does this give good results in general? *** simple.el 05 Jan 2006 10:48:16 -0500 1.783 --- simple.el 19 Jan 2006 12:11:57 -0500 *************** *** 3734,3740 **** (or arg (setq arg 1)) (if (/= arg 1) (line-move (1- arg) t)) ! (beginning-of-line 1) (let ((orig (point))) (vertical-motion 0) (if (/= orig (point)) --- 3735,3747 ---- (or arg (setq arg 1)) (if (/= arg 1) (line-move (1- arg) t)) ! ! ;; Move to beginning-of-line, ignoring fields and invisibles. ! (skip-chars-backward "^\n") ! (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) ! (goto-char (previous-char-property-change (1- (point)))) ! (skip-chars-backward "^\n")) ! (let ((orig (point))) (vertical-motion 0) (if (/= orig (point))