unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: storm@cua.dk, emacs-devel@gnu.org
Subject: Re: Cursor positioning with `after-string' overlays
Date: Fri, 02 Apr 2010 11:54:27 +0300	[thread overview]
Message-ID: <83iq8aw7y4.fsf@gnu.org> (raw)
In-Reply-To: <83mxxmwas8.fsf@gnu.org>

> Date: Fri, 02 Apr 2010 10:53:11 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: storm@cua.dk (Kim F. Storm)
> > Cc: emacs-devel@gnu.org
> > 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'.




  reply	other threads:[~2010-04-02  8:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 13:15 Cursor positioning with `after-string' overlays Eli Zaretskii
2010-04-01 21:54 ` Kim F. Storm
2010-04-02  7:53   ` Eli Zaretskii
2010-04-02  8:54     ` Eli Zaretskii [this message]
2010-04-02 10:24       ` Kim F. Storm
2010-04-01 22:06 ` Stefan Monnier
2010-04-02  8:16   ` Eli Zaretskii
2010-04-02 18:17     ` Stefan Monnier
2010-04-02 18:38       ` Eli Zaretskii
2010-04-02 20:35         ` Stefan Monnier
2010-04-02 21:16           ` Eli Zaretskii
2010-04-03  1:21             ` Stefan Monnier
2010-04-03  7:26               ` Eli Zaretskii
2010-04-03  7:30               ` redisplay code is ugly (was: Cursor positioning with `after-string' overlays) Eli Zaretskii
2010-04-03 10:42               ` Cursor positioning with `after-string' overlays Eli Zaretskii
2010-04-03 10:28       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83iq8aw7y4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).