emacs-devel
[Top][All Lists]
Advanced

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

Re: Should invisible imply intangible?


From: Stefan Monnier
Subject: Re: Should invisible imply intangible?
Date: Sat, 09 Mar 2002 17:37:16 -0500

>     > However, subsequently I realized it should be somewhat different.  The
>     > buffer position just after the invisible text should be treated as
>     > part of the range where point cannot be.  (This is how invisible,
>     > intangible text is handled now.)
> 
>     But that would make it very awkward for the user to insert text
>     immediately after the invisible area.
> 
> That is ok.  When text is invisible, it is very confusing
> if point can be either before or after.  It is much better
> if point can only be on one of those two places.

I could agree to it but only in the case where the screen representation
is really empty, so that both cursor positions are displayed in the same way.
On the other hand, if the text is replaced by ellipsis or by an image,
it is very strange not to be able to position the cursor after the invisible
text.

> Please do it that way.

I think it'd be an error because it's only desirable in some rare cases,
and I suspect that those cases would be better served by explicitly
using the `intangible' text property.

>     If we still want to provide the illusion that the text really isn't
>     there at all, then we should treat either the buffer position
>     immediately before or immediately after as part of the intangible text,
>     depending on the direction of the motion (so that both positions
>     can still be reached "easily").
> 
> This behavior of this would be similar in most respects to what I ask
> for, except less predictable.  So what I designed seems to be clearly
> better.

It is just as predictable.  And it is clearly superior since it allows
to do things which your design does not.  I often edit text with
hidden subparts (using outline-minor-mode) and I often insert text either
right before or right after an invisible area.  Being unable to insert
text right after would be very annoying.


        Stefan




reply via email to

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