From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Cursor positioning with `after-string' overlays Date: Fri, 02 Apr 2010 11:54:27 +0300 Message-ID: <83iq8aw7y4.fsf@gnu.org> References: <83bpe3xqjj.fsf@gnu.org> <87d3yialfb.fsf@kfs-lx.rd.rdm> <83mxxmwas8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1270198658 18356 80.91.229.12 (2 Apr 2010 08:57:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Apr 2010 08:57:38 +0000 (UTC) To: storm@cua.dk, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 02 10:57:32 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nxch2-0004Cm-9L for ged-emacs-devel@m.gmane.org; Fri, 02 Apr 2010 10:57:32 +0200 Original-Received: from localhost ([127.0.0.1]:42562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nxch1-0005DP-Lz for ged-emacs-devel@m.gmane.org; Fri, 02 Apr 2010 04:57:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxcfM-0003mB-NB for emacs-devel@gnu.org; Fri, 02 Apr 2010 04:55:48 -0400 Original-Received: from [140.186.70.92] (port=45193 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxcfK-0003j5-KM for emacs-devel@gnu.org; Fri, 02 Apr 2010 04:55:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxcfJ-0001LA-9Y for emacs-devel@gnu.org; Fri, 02 Apr 2010 04:55:46 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:62152) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxcfJ-0001Kh-2v for emacs-devel@gnu.org; Fri, 02 Apr 2010 04:55:45 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L0800M00R5U9100@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Fri, 02 Apr 2010 11:54:27 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.124.92.42]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L0800HO8REOQ490@a-mtaout20.012.net.il>; Fri, 02 Apr 2010 11:54:25 +0300 (IDT) In-reply-to: <83mxxmwas8.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123058 Archived-At: > Date: Fri, 02 Apr 2010 10:53:11 +0300 > From: Eli Zaretskii > 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'.