[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cursor positioning with `after-string' overlays
From: |
Eli Zaretskii |
Subject: |
Re: Cursor positioning with `after-string' overlays |
Date: |
Fri, 02 Apr 2010 11:54:27 +0300 |
> Date: Fri, 02 Apr 2010 10:53:11 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
>
> > From: address@hidden (Kim F. Storm)
> > Cc: address@hidden
> > Date: Thu, 01 Apr 2010 23:54:16 +0200
> >
> > CUA rectangle mode may use the old behaviour to place cursor midway
> > through a tab character - I cannot judge from your example if that
> > is still working with the trunk code, and I don't have time to check
> > one out (I got lost in the Bazaar)...
> >
> > But you can easily try it out.
> > Just enter:
> >
> > M-x cua-mode RET
> > a C-q C-i b
> > C-a C-RET C-f C-f C-f ..
> >
> > cursor should move successively from a through the tab until it reaches b
>
> You are right, it doesn't work. But it doesn't work in Emacs 23.1 and
> in Emacs 22.3, either, at least not on MS-Windows and on GNU/Linux.
>
> Are you sure the recipe is correct? If so, in what version of Emacs
> did it work for you?
I think I see the answer. The recipe should be modified like this:
M-x cua-mode RET
a C-q C-i b RET
C-p C-RET C-f C-f C-f ..
That is, there should be a newline after `b'. When modified like
this, I see the expected behavior both with the current trunk and with
older versions.
Is this satisfactory?
Note that what cua-rect.el does differs from the example I posted in
one crucial aspect: cua-rect.el uses an integer number, rather than
just `t', for the value of the `cursor' property. This number
actually tells the cursor-positioning code for which buffer positions
we should display the cursor on the character that has this property.
When the `cursor' property has an integer value, it really does
override the ``exact match for point always wins'' strategy, for
buffer positions that are ``covered'' by the value of `cursor'.
- Cursor positioning with `after-string' overlays, Eli Zaretskii, 2010/04/01
- Re: Cursor positioning with `after-string' overlays, Stefan Monnier, 2010/04/01
- Re: Cursor positioning with `after-string' overlays, Eli Zaretskii, 2010/04/02
- Re: Cursor positioning with `after-string' overlays, Stefan Monnier, 2010/04/02
- Re: Cursor positioning with `after-string' overlays, Eli Zaretskii, 2010/04/02
- Re: Cursor positioning with `after-string' overlays, Stefan Monnier, 2010/04/02
- Re: Cursor positioning with `after-string' overlays, Eli Zaretskii, 2010/04/02
- Re: Cursor positioning with `after-string' overlays, Stefan Monnier, 2010/04/02
- Re: Cursor positioning with `after-string' overlays, Eli Zaretskii, 2010/04/03
- Re: redisplay code is ugly (was: Cursor positioning with `after-string' overlays), Eli Zaretskii, 2010/04/03