From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: move-beginning-of-line Date: Sun, 13 Mar 2005 20:58:37 -0600 (CST) Message-ID: <200503140258.j2E2wbI11194@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1110769598 4925 80.91.229.2 (14 Mar 2005 03:06:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2005 03:06:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 14 04:06:38 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DAftQ-00050k-Nl for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 04:05:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAg91-0000Qn-T4 for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2005 22:21:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DAg5d-0007J1-BY for emacs-devel@gnu.org; Sun, 13 Mar 2005 22:17:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DAg5U-0007CT-Jv for emacs-devel@gnu.org; Sun, 13 Mar 2005 22:17:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAg5S-0007A1-TJ for emacs-devel@gnu.org; Sun, 13 Mar 2005 22:17:46 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DAfnR-0004Tj-PQ for emacs-devel@gnu.org; Sun, 13 Mar 2005 21:59:09 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j2E2ws9N020007; Sun, 13 Mar 2005 20:58:54 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j2E2wbI11194; Sun, 13 Mar 2005 20:58:37 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: storm@cua.dk In-reply-to: (storm@cua.dk) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34562 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34562 Kim Storm wrote: As I indicated in another mail today, I have been looking at a problem with moving to the beginning of a line in a window with the following appearence: abc [ ] x[IMAGE]yz [ ] def Now, if I place the cursor on x, and do C-e, cursor moves to z. If I then do C-a, cursor moves to y, not x. The IMAGE is layed on top (via a display property) of text that ends in a newline, so formally, C-a (beginning-of-line) DTRT. However, from a user point of view, this is !TRT. Sorry for replying so late to this, but is there some extremely good (that is, absolutely unavoidable) reason why that image is layed on top of text that _ends in a newline_ (or just contains newlines)? Is that fact, rather than beginning-of-line not the problem? Trying to "fix" the C-a behavior you consider "wrong" using `move-beginning-of-line' is not going to change the fact that every other Emacs command or function will still consider the offending newline to be the end of a line _and_ to be visible (unless it has the invisibility property). Giving newlines a display property is a very dubious thing to do. I do not believe that very much in Emacs is prepared for newlines with a display property. Contrary to what I previously thought, this is not caused by an error in the move_it_vertically_backward function -- it is simply the way bolp and beginning-of-line work, i.e. they don't care if the newline before point is invisible. And on top of that, unless that newline has the invisibility property, Emacs considers it to be visible, whether the user can see it or not. Sincerely, Luc.