From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: About the `cursor' property Date: Fri, 08 Mar 2013 16:15:45 +0200 Message-ID: <83ehfqyo32.fsf@gnu.org> References: <20130308204547.0d13defab21fa0d91e4a1075@gmail.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1362752172 16525 80.91.229.3 (8 Mar 2013 14:16:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Mar 2013 14:16:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 08 15:16:35 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UDy65-0005gG-EW for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Mar 2013 15:16:33 +0100 Original-Received: from localhost ([::1]:56491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDy5j-0001Fw-3M for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Mar 2013 09:16:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDy5O-0001Fo-Hk for help-gnu-emacs@gnu.org; Fri, 08 Mar 2013 09:15:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDy5H-0000ki-2z for help-gnu-emacs@gnu.org; Fri, 08 Mar 2013 09:15:50 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:55937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDy5G-0000jZ-Qu for help-gnu-emacs@gnu.org; Fri, 08 Mar 2013 09:15:43 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MJC00D00I2OLV00@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Fri, 08 Mar 2013 16:15:41 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJC00DVRIA4HK90@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Fri, 08 Mar 2013 16:15:41 +0200 (IST) In-reply-to: <20130308204547.0d13defab21fa0d91e4a1075@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89417 Archived-At: > Date: Fri, 8 Mar 2013 20:45:47 +0800 > From: Xue Fuqiao > > 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.