emacs-devel
[Top][All Lists]
Advanced

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

Re: invisible


From: Stephen Berman
Subject: Re: invisible
Date: Thu, 29 Nov 2007 00:23:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

On Tue, 27 Nov 2007 19:46:23 +0100 martin rudalics <address@hidden> wrote:

>> It turns out that it's also a good behavior in the sense that you can
>> get the other two behaviors (ignore all invisible text properties and
>> obey all invisible text properties) in the following way:
>>
>>    (let ((buffer-invisibility-spec nil)) (current-column))
>
> It's not just neat, it's splendid.  We can dispense with that
> rear-nonstickyness and DTRT with plain rear-sticky, invisible
> text.  Stephen, please try with the attached patch, it should
> work out of the box.

I'm afraid it did not, which puzzles me in view of the confidence you
expressed.  I wonder if we did something different again.  I did emacs
-Q, evalled line-move-finish and line-move-to-column with your patch
applied and evalled the sexps in your test file lmii.txt.  Here are the
results I got:

1. 
  i. with '(invisible t):
    fl-1
     Starting with point on or after the `l' of `line7', cursor moves
     to the `l' of line6, then the `l' of line4, then the `l' of line2,
     then the `l' of line1.
    C-p
    a. Starting with point on or after the `i' of `line7', cursor moves
       successively to the corresponding column of the preceding line.
    b. Starting with point on the `l' of `line7', cursor moves to the `l'
       of line6, then the `l' of line4, then the `l' of line2, then the
       `l' of line1.

  ii. with '(invisible t rear-nonsticky t):
    fl-1
     Starting with point on or after the `l' of `line7', cursor moves
     successively to the `l' of the preceding line.
    C-p
     Starting with point on the `l' of `line7', cursor moves
     successively to the corresponding column of the preceding line.

I also tested making line4 invisible (add-text-properties 19 25 ...),
which one of the original bug reports was about:

2. 
  i. with '(invisible t):
    fl-1
     Starting with point with point anywhere on line7, cursor moves
     successively to the `l' of the preceding line.
    C-p
     Starting with point anywhere on line7, cursor moves to the
     corresponding column of line6, then to the corresponding 
     column of line5, then to the `l' of line5, then back to the
     goal column in line3 and likewise with line2 and line1.
    C-n
     Starting with point anywhere on line1 or line2, cursor moves to the
     corresponding column of the next line.  Continuing from line3, C-n
     move cursor to the `l' of line5, and with the next C-n to the
     previous goal column in line5.  Subsequent C-n's move the cursor to
     the next line also at the same column.

  ii. with '(invisible t rear-nonsticky t):
    fl-1
     Starting with point with point anywhere on line7, cursor moves
     to the `l' of line6, then to the `l' of line5, then to the end of
     line3, then to the `l' of line2 and likewise line1.
    C-p
     Starting with point anywhere on line7, cursor moves to the
     corresponding column of line6, then to the corresponding column of
     line5, then to the `l' of line5, then to the end of line3, then
     back to the goal column in line2 and likewise in line1.
    C-n
     a. Starting with point on the `l' of line1, line2, or line3, cursor
        moves to the `l' of the next line.  Continuing with C-n at
        line3, cursor moves to the `i' of line5, then to the `l' of
        line6 and likewise line7.  However, if, after reaching the `i'
        line5 with C-n, I then type C-p, cursor moves first to the `l'
        of line5, then to the `l' of line3 (not, as above, to the end of
        line2), and to the `l' of line2 and line1.
     b. Starting with point on any position but the `l' of line1 or
        line2, cursor moves to the corresponding column of the next
        line.  Continuing from line3, cursor moves to the `l' of line5,
        then to the original goal column in line5 and likewise in line6
        and line7.

Steve Berman





reply via email to

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