From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lorentey@elte.hu (=?utf-8?Q?L=C5=91rentey_K=C3=A1roly?=) Newsgroups: gmane.emacs.devel Subject: Re: Something is rotten with end-of-line and move-end-of-line Date: Mon, 28 Nov 2005 21:17:59 +0100 Message-ID: References: <85y83dleho.fsf@lola.goethe.zz> <85br04btnu.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1133210930 18805 80.91.229.2 (28 Nov 2005 20:48:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 20:48:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 28 21:48:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Egpqm-0001xi-6Y for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 21:43:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egpql-0005JH-Jj for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 15:43:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Egpof-0004NC-9z for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:41:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Egpod-0004Ly-Bo for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:41:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egpoc-0004Lg-VT for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:41:35 -0500 Original-Received: from [212.92.23.158] (helo=ninsei.hu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Egpob-0007wy-MQ for emacs-devel@gnu.org; Mon, 28 Nov 2005 15:41:34 -0500 Original-Received: from walrus (walrus.inf.elte.hu [157.181.166.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by chatsubo.ninsei.hu (Postfix) with ESMTP id 98EC41AD07 for ; Mon, 28 Nov 2005 21:17:34 +0100 (CET) Original-Received: by walrus (Postfix, from userid 1000) id EAFEB5E17E; Mon, 28 Nov 2005 21:17:59 +0100 (CET) Original-To: emacs-devel@gnu.org In-Reply-To: <85br04btnu.fsf@lola.goethe.zz> (David Kastrup's message of "Mon, 28 Nov 2005 17:53:41 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.52 (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:46722 Archived-At: David Kastrup writes: > lorentey@elte.hu (L=C5=91rentey K=C3=A1roly) writes: >> L=C5=91rentey K=C3=A1roly writes: >>> The difference (a difference?) is inside fields: >>> `{beginning,end}-of-line' moves to the beginning/end of the field, >>> while `move-{beginning,end}-of-line' stops at the field boundaries: >> >> Sorry, I meant `move-{beginning,end}-of-line' goes to the actual line en= ds. > > Both doc strings claim to merely go to the field boundaries: Indeed, there are some bugs. `end-of-line' does stop at the current field's boundary, although repeated executions escape from the field. However, `move-end-of-line' always jumps over the end of the field, which is clearly wrong. `move-beginning-of-line' is similarly broken, but only if the field property isn't front-sticky. Otherwise both `beginning-of-line' and `move-beginning-of-line' stop at the field boundary, and they stay there if repeated. Try this test in a fundamental buffer: (let ((s "Test Normal Front-sticky Test")) (add-text-properties 5 11 '(face widget-field field foo) s) (add-text-properties 12 24 '(face widget-field field bar front-sticky t)= s) (insert s)) Thus, the current behaviour is clearly broken. It is not clear, however, what C-a/C-e is supposed to do when point is on a field boundary. * * * Meanwhile, I found an archived discussion thread which explains the intended difference between the two flavours: http://thread.gmane.org/gmane.emacs.devel/34012 From: Kim F. Storm Subject: move-beginning-of-line Date: 2005-03-01 23:01:16 GMT Message-ID: There is a test case given in the discussion that demonstrates the original problem: (progn (insert "\nab") (insert-image-file "../etc/splash.xpm") (move-end-of-line 1)=20 (insert "def\n")) move-b/e-of-line move across the image to the line ending that corresponds to what is displayed on the screen, while the builtin b/e-of-line variants stop at the hidden newlines embedded in the image file. Funnily enough, on closer inspection the doc string do indicate this difference: ,----[ C-h f move-beginning-of-line RET | Move point to beginning of current display line. | ^^^^^^^ `---- ,----[ C-h f beginning-of-line RET | Move point to beginning of current line. `---- Obviously this needs to be elaborated. --=20 K=C3=A1roly