all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: About the `cursor' property
Date: Fri, 08 Mar 2013 16:15:45 +0200	[thread overview]
Message-ID: <83ehfqyo32.fsf@gnu.org> (raw)
In-Reply-To: <20130308204547.0d13defab21fa0d91e4a1075@gmail.com>

> Date: Fri, 8 Mar 2013 20:45:47 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> 
> In (info "(elisp) Special Properties"), there is a `cursor' property.
> 
> It says that:
> 
>   `cursor'
>      Normally, the cursor is displayed at the beginning or the end of
>      any overlay and text property strings present at the current
>      buffer position.  You can place the cursor on any desired
>      character of these strings by giving that character a non-`nil'
>      `cursor' text property. [...]
> 
> I had read through this node, but I still didn't know how to use this
> property.  I tried "(add-text-properties 1 5 '(cursor 2))" in
> *scratch*, but the cursor didn't move.  Can anybody help?  Thanks.

Look at cua-rect.el, there are some revealing examples of how to use
this feature, including setting the property to a numerical value
(which was introduced because cua-rect needed something like this).

In any case, putting this property on buffer text doesn't have any
effect, as Emacs only considers this property on display and overlay
strings.  The fragment you cited from the manual explicitly speaks
about display and overlay strings, for that very reason.



      parent reply	other threads:[~2013-03-08 14:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 12:45 About the `cursor' property Xue Fuqiao
2013-03-08 13:05 ` Jambunathan K
2013-03-08 14:15 ` Eli Zaretskii [this message]

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

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

  git send-email \
    --in-reply-to=83ehfqyo32.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.