[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move-beginning-of-line

From: Luc Teirlinck
Subject: Re: move-beginning-of-line
Date: Sun, 13 Mar 2005 20:58:37 -0600 (CST)

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

    [     ]
    [     ]

   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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]