emacs-devel
[Top][All Lists]
Advanced

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

Re: Keeping hidden characters visible to the cursor


From: Stefan Monnier
Subject: Re: Keeping hidden characters visible to the cursor
Date: Sun, 15 Nov 2009 23:50:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> font-lock-string-face to get the underlining BUT there's one thing I could
> not achieve yet: To keep the cursor aware of these hidden characters.
> Whenever I moved the cursor it skipped the position as if nothing existed in
> that position, and entering some text right before the string went inside
> the string.

This is part of `point-adjustment'.  E.g. you can set
global-disable-point-adjustment to disable it.

But maybe a better way is to change the way you make the text invisible:
depending on the stickiness (resp. the insertion-type) of the
text-property (resp. overlay), the point-adjustment will try to put
point at one end or the other of the invisible text.

If neither end is sticky, then point will sometimes get to one end and
sometimes to the other, depending on how you get there.  E.g. if the "b"
in "abc" is made non-sticky invisible, then C-f from "!abc" will get you
to "a!bc" and the next C-f to "abc!", whereas C-b from "abc!" will get
you to "ab!c" and the next to "!abc".


        Stefan




reply via email to

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