emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: moving point over invisible and intangible text


From: Luc Teirlinck
Subject: Re: moving point over invisible and intangible text
Date: Thu, 16 Oct 2003 20:57:07 -0500 (CDT)

>From my previous message:

   Is it a good idea for `line-move-to-column' _itself_ to do what it
   currently does?  Is the behavior I described a bug or a subtlety?

To answer part of my own question: it is a subtlety.  New question:

Is it _only_ a subtlety or is it _both_ a bug _and_ a subtlety?

>From one of my previous messages:

   line1
   line2
   line3
   line4

   Put point at the end of line3.

   with line2 (including trailing newline) being either invisible or
   intangible, but _not both_, (line-move-to-column 0) takes point to the
   beginning of line3, but with line2 being _both_ invisible and
   intangible (line-move-to-column 0) takes point to the beginning of
   line2.  (Use C-x = if line2 is invisible.)  This seems to explain the
   behavior described by Klaus, given the call to `line-move-to-column'
   in `line-move-finish'.  However, is this behavior of
   `line-move-to-column' to be expected or a bug?

It is to be expected.  (Which does not automatically mean that it is
desirable.)  Indeed, `line-move-to-column' _tries_ to move point to
the beginning of line3, but point can not stop there, it _has_ to keep
moving to the beginning of line2.  From the NEWS:

    ** Only one of the beginning or end of an invisible, intangible region
       is considered an acceptable value for point; which one is
       determined by examining how the invisible/intangible properties are
       inherited when new text is inserted adjacent to them.  (The
       `front-sticky' and `rear-sticky' properties control this.)

    If the invisible/intangible would be inherited by any text inserted
    before this region, then the position before it is considered
    unacceptable, and point is forced to continue (if moving forwards, to
    the position following the invisible/intangible text; if moving
    backwards, to one position before).  If the properties would be
    inherited by any text inserted after, then the position after is
    considered unacceptable, and point is forced to keep moving (if moving
    backwards, to the position preceding the invisible/intangible text; if
    moving forwards, to one position later).

    Thus, point can only go to one end of an invisible, intangible region,
    but not the other one.  This prevents C-f and C-b from appearing to
    stand still on the screen.

So, is the behavior correct or do we want (line-move-to-column 0) at
the end of line3 with line2, including trailing newline, both invisible
and intangible, to move to the "i" of line3?  I believe that would
fix the C-n behavior reported by Klaus. 

Sincerely,

Luc.




reply via email to

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