GNU bug report logs - #21207
25.0.50; Cursor position behaves unpredictably on the 'display text property

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: bruce.connor.am@HIDDEN; dated Fri, 7 Aug 2015 15:08:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 8 Aug 2015 03:39:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 23:39:53 2015
Received: from localhost ([127.0.0.1]:50507 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNuzB-000302-0K
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 23:39:53 -0400
Received: from mail-la0-f48.google.com ([209.85.215.48]:34627)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNuz9-0002zt-5q
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 23:39:51 -0400
Received: by labd1 with SMTP id d1so17732436lab.1
 for <21207 <at> debbugs.gnu.org>; Fri, 07 Aug 2015 20:39:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:reply-to:sender:in-reply-to:references:date:message-id
 :subject:from:to:cc:content-type;
 bh=HdUzpXxErJ3vuubzTa5ws5niNCL/b7PPUa61bqnqGuY=;
 b=LyZdvBo1EHiWUU9eWlXjzJV8sVlQmvECx8APlV46ptu+BiXHY/P9Xs5s+SFtxZmg8t
 28hwTQlWNl5LLu+cdpar07r7aJeDLrLczhSPP8H0n+rAWudAy/CLPyWdbnfaUSe62vIe
 JO6G+d/UKnuiOLT5PnO84rqO+AdOGUrxxk9FHQTF0MQT6BPOPBU8pAwfMelqlpZ3s9Kh
 hN5WhtfjlgaSbqgEJQ9x7u/TFIvGfpttvXo5xZaxhrK5hBLcaxytPWTcoIsVpcsEUqaP
 ydQlljYrawAcgZizH3q6jUEw87W5OKN3GT8ioS/xkBsQioB0/bCahPVzFHnTupUohp5w
 AxkQ==
MIME-Version: 1.0
X-Received: by 10.153.7.137 with SMTP id dc9mr10982206lad.16.1439005190256;
 Fri, 07 Aug 2015 20:39:50 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 20:39:49 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 20:39:49 -0700 (PDT)
In-Reply-To: <83k2t6rh5p.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN>
 <CAAdUY-J3TQunGtSLQHOu3LgYX_zk7XbEMcbQ6__hArAzn8KZ0A@HIDDEN>
 <83lhdmrkcq.fsf@HIDDEN>
 <CAAdUY-L88fUzP-je5-7+Q6C5LeE+7vCtF1zCKemiuOeVnnNrLA@HIDDEN>
 <83k2t6rh5p.fsf@HIDDEN>
Date: Sat, 8 Aug 2015 04:39:49 +0100
X-Google-Sender-Auth: E_OcIJ4loSqHiH42inVE75JLCh4
Message-ID: <CAAdUY-LwY-BUZEOpwnEezXNh7+8Fo3Cb5PdLWMj_O18UyNAmgw@HIDDEN>
Subject: Re: bug#21207: 25.0.50; Cursor position behaves unpredictably on the
 'display text property
From: Artur Malabarba <bruce.connor.am@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=001a113462a431ffb9051cc4812e
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: bruce.connor.am@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a113462a431ffb9051cc4812e
Content-Type: text/plain; charset=UTF-8

On Aug 7, 2015 9:13 PM, "Eli Zaretskii" <eliz@HIDDEN> wrote:
>
> > Date: Fri, 7 Aug 2015 20:56:38 +0100
> > From: Artur Malabarba <bruce.connor.am@HIDDEN>
> > Cc: 21207 <at> debbugs.gnu.org
> >
> > > In general, I hoped that line wrap at some constant column other than
> > > the window edge (which is what I understand you are trying to do) will
> > > be implemented on the display engine level, where IMO it belongs, not
> > > by using display properties and such likes.
> >
> > That makes sense. Would it still be possible to make that depend on a
> > predicate defined in a lisp variable? Or would the display engine run
> > too deep for that?
>
> Not sure I understand what kind of predicate you have in mind.  Please
> elaborate.

Something like *fill-nobreak-predicate*. You provide a nullary predicate
function, and wrapping is not done on lines where that predicate evaluates
to t.

Longlines-mode does that and it's the reason I use it. It lets me wrap
latex text without wrapping equations.

--001a113462a431ffb9051cc4812e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr"><br>
On Aug 7, 2015 9:13 PM, &quot;Eli Zaretskii&quot; &lt;<a href=3D"mailto:eli=
z@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Date: Fri, 7 Aug 2015 20:56:38 +0100<br>
&gt; &gt; From: Artur Malabarba &lt;<a href=3D"mailto:bruce.connor.am@gmail=
.com">bruce.connor.am@HIDDEN</a>&gt;<br>
&gt; &gt; Cc: <a href=3D"mailto:21207 <at> debbugs.gnu.org">21207@HIDDEN=
g</a><br>
&gt; &gt;<br>
&gt; &gt; &gt; In general, I hoped that line wrap at some constant column o=
ther than<br>
&gt; &gt; &gt; the window edge (which is what I understand you are trying t=
o do) will<br>
&gt; &gt; &gt; be implemented on the display engine level, where IMO it bel=
ongs, not<br>
&gt; &gt; &gt; by using display properties and such likes.<br>
&gt; &gt;<br>
&gt; &gt; That makes sense. Would it still be possible to make that depend =
on a<br>
&gt; &gt; predicate defined in a lisp variable? Or would the display engine=
 run<br>
&gt; &gt; too deep for that?<br>
&gt;<br>
&gt; Not sure I understand what kind of predicate you have in mind.=C2=A0 P=
lease<br>
&gt; elaborate.</p>
<p dir=3D"ltr">Something like <b>fill-nobreak-predicate</b>. You provide a =
nullary predicate function, and wrapping is not done on lines where that pr=
edicate evaluates to t. </p>
<p dir=3D"ltr">Longlines-mode does that and it&#39;s the reason I use it. I=
t lets me wrap latex text without wrapping equations. <br>
</p>

--001a113462a431ffb9051cc4812e--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 20:13:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 16:13:35 2015
Received: from localhost ([127.0.0.1]:50384 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNo1H-0006rS-4U
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 16:13:35 -0400
Received: from mtaout22.012.net.il ([80.179.55.172]:51335)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1ZNo1E-0006rE-3E
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 16:13:33 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NSQ00000AL6WR00@HIDDEN> for 21207 <at> debbugs.gnu.org;
 Fri, 07 Aug 2015 23:13:25 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NSQ0004IAUCPL90@HIDDEN>;
 Fri, 07 Aug 2015 23:13:25 +0300 (IDT)
Date: Fri, 07 Aug 2015 23:13:22 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21207: 25.0.50;
 Cursor position behaves unpredictably on the 'display text property
In-reply-to: <CAAdUY-L88fUzP-je5-7+Q6C5LeE+7vCtF1zCKemiuOeVnnNrLA@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: bruce.connor.am@HIDDEN
Message-id: <83k2t6rh5p.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN>
 <CAAdUY-J3TQunGtSLQHOu3LgYX_zk7XbEMcbQ6__hArAzn8KZ0A@HIDDEN>
 <83lhdmrkcq.fsf@HIDDEN>
 <CAAdUY-L88fUzP-je5-7+Q6C5LeE+7vCtF1zCKemiuOeVnnNrLA@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 7 Aug 2015 20:56:38 +0100
> From: Artur Malabarba <bruce.connor.am@HIDDEN>
> Cc: 21207 <at> debbugs.gnu.org
> 
> > In general, I hoped that line wrap at some constant column other than
> > the window edge (which is what I understand you are trying to do) will
> > be implemented on the display engine level, where IMO it belongs, not
> > by using display properties and such likes.
> 
> That makes sense. Would it still be possible to make that depend on a
> predicate defined in a lisp variable? Or would the display engine run
> too deep for that?

Not sure I understand what kind of predicate you have in mind.  Please
elaborate.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 19:56:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 15:56:47 2015
Received: from localhost ([127.0.0.1]:50380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNnl1-0006SD-3R
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 15:56:47 -0400
Received: from mail-la0-f52.google.com ([209.85.215.52]:34804)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNnky-0006Ry-S9
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 15:56:45 -0400
Received: by labd1 with SMTP id d1so14164115lab.1
 for <21207 <at> debbugs.gnu.org>; Fri, 07 Aug 2015 12:56:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:reply-to:sender:in-reply-to:references:date:message-id
 :subject:from:to:cc:content-type;
 bh=VBcUH0F3KQizmARRdEaRXjITCPZiNFeYBd73D0IthKw=;
 b=sJH8C3wPJiNWD4PANuggdzLWj93usQ68EJYh8NLYStt0ZBGVTZzXeoKLNxfvHba7fb
 1gF/MVTolgadjfn8YmxUFjep5JPf8aB4ksBggYtxSnUsOfRM+LiqaO0x4e5Qd6iLYoXC
 J1ERDV1+SvTlKqOZg2xAPD1rUeEceGTcRTssRRDhCOtNV957TMvkekriO7l2n9vMcfjx
 gaUMWaEAeXB319h2WicTq5mjYSBV6lRV63DT8DnSzYzmbcsmBymci1D8rU5PSlzEFALg
 SiVVxVGSUzN73t+9ZVO23Ub6zaSisCSJ0IXoMGy0QvnhiB19mnVIha30SnIU/srNDPTt
 8T6A==
MIME-Version: 1.0
X-Received: by 10.112.25.69 with SMTP id a5mr9619935lbg.16.1438977398865; Fri,
 07 Aug 2015 12:56:38 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 12:56:38 -0700 (PDT)
In-Reply-To: <83lhdmrkcq.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN>
 <CAAdUY-J3TQunGtSLQHOu3LgYX_zk7XbEMcbQ6__hArAzn8KZ0A@HIDDEN>
 <83lhdmrkcq.fsf@HIDDEN>
Date: Fri, 7 Aug 2015 20:56:38 +0100
X-Google-Sender-Auth: rFsOzAPs4dMKTG9cF669OQgNCZ8
Message-ID: <CAAdUY-L88fUzP-je5-7+Q6C5LeE+7vCtF1zCKemiuOeVnnNrLA@HIDDEN>
Subject: Re: bug#21207: 25.0.50; Cursor position behaves unpredictably on the
 'display text property
From: Artur Malabarba <bruce.connor.am@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: bruce.connor.am@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

2015-08-07 20:04 GMT+01:00 Eli Zaretskii <eliz@HIDDEN>:
>> Date: Fri, 7 Aug 2015 19:31:29 +0100
>> From: Artur Malabarba <bruce.connor.am@HIDDEN>
>> Cc: 21207 <at> debbugs.gnu.org
>>
>> I'm using this to visually wrap some lines, but not others (as part of
>> rewriting longlines-mode to work without editing the buffer).
>> I can wrap only the lines I want by doing the procedure in item 2 (displaying a
>> space as a newline). When the line I'm wrapping happens to be indented, I have
>> to use the procedure in item 4 (so the second line gets indented too), and it's
>> mildly annoying that I can't place the cursor at the end of the line.
>
> Can you use line-prefix and/or wrap-prefix for that?

Thanks. That works if I place the line-prefix at the char after the
space, so it looks like it's enough.

> It should be possible to support the 'cursor' property on a newline
> inside a display string, but not inside an overlay string.  Not sure
> if this disparity will not cause confusion and resistance, as we
> generally try to support the same features in both cases.
>
> In general, I hoped that line wrap at some constant column other than
> the window edge (which is what I understand you are trying to do) will
> be implemented on the display engine level, where IMO it belongs, not
> by using display properties and such likes.

That makes sense. Would it still be possible to make that depend on a
predicate defined in a lisp variable? Or would the display engine run
too deep for that?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 19:43:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 15:43:52 2015
Received: from localhost ([127.0.0.1]:50374 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNnYV-0006AH-JE
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 15:43:52 -0400
Received: from mail-la0-f41.google.com ([209.85.215.41]:34930)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNnYS-0006A3-3Q
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 15:43:48 -0400
Received: by labkb6 with SMTP id kb6so51572510lab.2
 for <21207 <at> debbugs.gnu.org>; Fri, 07 Aug 2015 12:43:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:reply-to:sender:in-reply-to:references:date:message-id
 :subject:from:to:cc:content-type;
 bh=GAdHBsqxnbbDR+h2CJ/mheyqKqPIVU7eU4rtmTugBKE=;
 b=MXGNPU+A/Qox7mb+I/2bHT/MeVBAbSf55nlp64x1tdhAU/iL9DuzUqwu6tUVjT7/7T
 ocvJ54pu6lybTmk7klYctseChPFhLNUZNNexmBHrFTjqgWH7529sGtfkf8doWshuN+Xz
 WjDcLKnOgYMa48DeNs1tuIGVvMOvWDXaR/rksBiihlXNRluUMs/Jxae+GLxBBeN22W9O
 TBAdjM7vKzG3kPjyVGgGlsLHOogFfASKgSxSW5lSAgktbdXJ6TAfGePLVYofvlOOjE0U
 SrMUQIG7+SWsuXbn21/85y+sj1KpoIreIB1WSImMFaPBTIhRWP4NS9YdtdFokRlApDry
 YRIw==
MIME-Version: 1.0
X-Received: by 10.152.4.163 with SMTP id l3mr9809972lal.35.1438976621919; Fri,
 07 Aug 2015 12:43:41 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 12:43:41 -0700 (PDT)
In-Reply-To: <83oaijq7nq.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN> <83oaijq7nq.fsf@HIDDEN>
Date: Fri, 7 Aug 2015 20:43:41 +0100
X-Google-Sender-Auth: oJq4iKE2dG4rMyc6GCj2kft6LPU
Message-ID: <CAAdUY-LEjKPd-KsWr43G9fVdE4iitcpm9GCbX997znV2=h8m8w@HIDDEN>
Subject: Re: bug#21207: 25.0.50; Cursor position behaves unpredictably on the
 'display text property
From: Artur Malabarba <bruce.connor.am@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: bruce.connor.am@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

2015-08-07 19:23 GMT+01:00 Eli Zaretskii <eliz@HIDDEN>:
>> Date: Fri, 07 Aug 2015 18:29:10 +0300
>> From: Eli Zaretskii <eliz@HIDDEN>
>> Cc: 21207 <at> debbugs.gnu.org
>>
>> > If I can place the cursor on the newline in the first scenario, why
>> > can't I do so in the second?
>>
>> Because we have special support for cursor positioning on display
>> strings that end in a newline
>
> More importantly: in the first scenario the newline ends the display
> string, whereas in the second it is in its middle.

Isn't it at the start of the display string?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 19:04:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 15:04:33 2015
Received: from localhost ([127.0.0.1]:50365 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNmwS-0005Dl-LF
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 15:04:33 -0400
Received: from mtaout29.012.net.il ([80.179.55.185]:57561)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1ZNmwQ-0005DV-4S
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 15:04:31 -0400
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NSQ003006XUX600@HIDDEN> for
 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 22:04:09 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NSQ00OEM7MW3H70@HIDDEN>; Fri, 07 Aug 2015 22:04:09 +0300 (IDT)
Date: Fri, 07 Aug 2015 22:04:21 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21207: 25.0.50;
 Cursor position behaves unpredictably on the 'display text property
In-reply-to: <CAAdUY-J3TQunGtSLQHOu3LgYX_zk7XbEMcbQ6__hArAzn8KZ0A@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: bruce.connor.am@HIDDEN
Message-id: <83lhdmrkcq.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN>
 <CAAdUY-J3TQunGtSLQHOu3LgYX_zk7XbEMcbQ6__hArAzn8KZ0A@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 7 Aug 2015 19:31:29 +0100
> From: Artur Malabarba <bruce.connor.am@HIDDEN>
> Cc: 21207 <at> debbugs.gnu.org
> 
> I'm using this to visually wrap some lines, but not others (as part of
> rewriting longlines-mode to work without editing the buffer). 
> I can wrap only the lines I want by doing the procedure in item 2 (displaying a
> space as a newline). When the line I'm wrapping happens to be indented, I have
> to use the procedure in item 4 (so the second line gets indented too), and it's
> mildly annoying that I can't place the cursor at the end of the line.

Can you use line-prefix and/or wrap-prefix for that?

It should be possible to support the 'cursor' property on a newline
inside a display string, but not inside an overlay string.  Not sure
if this disparity will not cause confusion and resistance, as we
generally try to support the same features in both cases.

In general, I hoped that line wrap at some constant column other than
the window edge (which is what I understand you are trying to do) will
be implemented on the display engine level, where IMO it belongs, not
by using display properties and such likes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 18:31:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 14:31:38 2015
Received: from localhost ([127.0.0.1]:50346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNmQb-0004Tq-Fv
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 14:31:37 -0400
Received: from mail-la0-f41.google.com ([209.85.215.41]:35984)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNmQZ-0004Ta-9V
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 14:31:35 -0400
Received: by lagz9 with SMTP id z9so26739655lag.3
 for <21207 <at> debbugs.gnu.org>; Fri, 07 Aug 2015 11:31:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:reply-to:sender:in-reply-to:references:date:message-id
 :subject:from:to:cc:content-type;
 bh=KqMfUb/WleshfLSc5NtgyKz4RYZfMiXLa42zALuCLFA=;
 b=OCapRPTv1I1mVeEvALDvRds32LdG/EFwuGiUYepdbnMz00r0pdjaF3mOe1Bol3VAL/
 Baq1Z18GtYXBX4Kqrmkw9LEu391cVJ/l/jkBLjLqAIPi0+I1NKHpoGDUtx15jwcjgGrW
 o2TsTTplxYfxydXCpKHV1UPFHL9ucqWyFi/7E47v1n1kBCNDuLmTgG/Ig12SqP6A8Du8
 PQVaJtztmQm2oLqemsyXO1DFcg2V/Bw1sdubo6pnXZ1fbbhNSgASoncUIoRQVgX/srYd
 oy5+MbxUSrIjFxoO3gW3zrqc3oWHmMAGr55GmHMjuR3x1eZM/7xykQRpkdoSj5KE9oY1
 zEnA==
MIME-Version: 1.0
X-Received: by 10.152.4.163 with SMTP id l3mr9529340lal.35.1438972289096; Fri,
 07 Aug 2015 11:31:29 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 11:31:29 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 11:31:29 -0700 (PDT)
In-Reply-To: <83twsbqfqx.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN>
Date: Fri, 7 Aug 2015 19:31:29 +0100
X-Google-Sender-Auth: hkwlMvuV_AtI-Q-8OoJS6b2WZB0
Message-ID: <CAAdUY-J3TQunGtSLQHOu3LgYX_zk7XbEMcbQ6__hArAzn8KZ0A@HIDDEN>
Subject: Re: bug#21207: 25.0.50; Cursor position behaves unpredictably on the
 'display text property
From: Artur Malabarba <bruce.connor.am@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=089e013d100c222226051cbcd8c7
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: bruce.connor.am@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--089e013d100c222226051cbcd8c7
Content-Type: text/plain; charset=UTF-8

> > If I can place the cursor on the newline in the first scenario, why
> > can't I do so in the second?
>
> Because we have special support for cursor positioning on display
> strings that end in a newline (AFAIR, since some packages that change
> how a newline is displayed needed that).
>
> > I tried adding a '(cursor t) property to the "\n" substring, but
> > nothing changed.
>
> You cannot put a 'cursor' property on a newline, because a newline
> leaves no glyphs on display.  To be effective, the 'cursor' property
> needs to be placed on a character that produces some glyph.

That makes sense. Thanks for the explanations, Eli.

> > Is there a way around this?
>
> Why do you need it?  What is your real-life use case?

I'm using this to visually wrap some lines, but not others (as part of
rewriting longlines-mode to work without editing the buffer).
I can wrap only the lines I want by doing the procedure in item 2
(displaying a space as a newline). When the line I'm wrapping happens to be
indented, I have to use the procedure in item 4 (so the second line gets
indented too), and it's mildly annoying that I can't place the cursor at
the end of the line.

--089e013d100c222226051cbcd8c7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr"><br>
&gt; &gt; If I can place the cursor on the newline in the first scenario, w=
hy<br>
&gt; &gt; can&#39;t I do so in the second?<br>
&gt;<br>
&gt; Because we have special support for cursor positioning on display<br>
&gt; strings that end in a newline (AFAIR, since some packages that change<=
br>
&gt; how a newline is displayed needed that).<br>
&gt;<br>
&gt; &gt; I tried adding a &#39;(cursor t) property to the &quot;\n&quot; s=
ubstring, but<br>
&gt; &gt; nothing changed.<br>
&gt;<br>
&gt; You cannot put a &#39;cursor&#39; property on a newline, because a new=
line<br>
&gt; leaves no glyphs on display.=C2=A0 To be effective, the &#39;cursor&#3=
9; property<br>
&gt; needs to be placed on a character that produces some glyph.</p>
<p dir=3D"ltr">That makes sense. Thanks for the explanations, Eli.</p>
<p dir=3D"ltr">&gt; &gt; Is there a way around this?<br>
&gt;<br>
&gt; Why do you need it?=C2=A0 What is your real-life use case?</p>
<p dir=3D"ltr">I&#39;m using this to visually wrap some lines, but not othe=
rs (as part of rewriting longlines-mode to work without editing the buffer)=
. <br>
I can wrap only the lines I want by doing the procedure in item 2 (displayi=
ng a space as a newline). When the line I&#39;m wrapping happens to be inde=
nted, I have to use the procedure in item 4 (so the second line gets indent=
ed too), and it&#39;s mildly annoying that I can&#39;t place the cursor at =
the end of the line.</p>

--089e013d100c222226051cbcd8c7--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 18:24:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 14:24:11 2015
Received: from localhost ([127.0.0.1]:50342 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNmJP-0004Ig-92
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 14:24:11 -0400
Received: from mtaout29.012.net.il ([80.179.55.185]:50646)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1ZNmJL-0004IA-Gb
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 14:24:09 -0400
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NSQ00L0057PN300@HIDDEN> for
 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 21:23:46 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NSQ00O1V5RI3H00@HIDDEN>; Fri, 07 Aug 2015 21:23:46 +0300 (IDT)
Date: Fri, 07 Aug 2015 21:23:53 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21207: 25.0.50;
 Cursor position behaves unpredictably on the 'display text property
In-reply-to: <83twsbqfqx.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: bruce.connor.am@HIDDEN
Message-id: <83oaijq7nq.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
 <83twsbqfqx.fsf@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 07 Aug 2015 18:29:10 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 21207 <at> debbugs.gnu.org
> 
> > If I can place the cursor on the newline in the first scenario, why
> > can't I do so in the second?
> 
> Because we have special support for cursor positioning on display
> strings that end in a newline

More importantly: in the first scenario the newline ends the display
string, whereas in the second it is in its middle.  We never put the
cursor in the middle of a display string, always after it (unless
there's a 'cursor' property on some of its glyphs).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at 21207 <at> debbugs.gnu.org:


Received: (at 21207) by debbugs.gnu.org; 7 Aug 2015 15:29:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 11:29:18 2015
Received: from localhost ([127.0.0.1]:41964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNjaA-0002ka-9P
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 11:29:18 -0400
Received: from mtaout29.012.net.il ([80.179.55.185]:50335)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1ZNja7-0002kM-4U
 for 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 11:29:16 -0400
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NSP00600XGIGN00@HIDDEN> for
 21207 <at> debbugs.gnu.org; Fri, 07 Aug 2015 18:28:58 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NSP005BRXO9EY20@HIDDEN>; Fri, 07 Aug 2015 18:28:58 +0300 (IDT)
Date: Fri, 07 Aug 2015 18:29:10 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21207: 25.0.50;
 Cursor position behaves unpredictably on the 'display text property
In-reply-to: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: bruce.connor.am@HIDDEN
Message-id: <83twsbqfqx.fsf@HIDDEN>
References: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 21207
Cc: 21207 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 7 Aug 2015 16:07:27 +0100
> From: Artur Malabarba <bruce.connor.am@HIDDEN>
> 
> 1. Type `single line' into an empty buffer, and place the cursor at the space.
> 2. Hit M-: and evaluate the following snippet
>     (add-text-properties (point) (1+ (point)) '(display "\n"))
> 3. When the space in the middle gets "turned" into a newline, the
> cursor is left where it was (at the fake end of the first line, right
> after the word `single').
> 4. Now follow the same steps on a new buffer, but evalate this instead:
> (add-text-properties (point) (1+ (point)) '(display "\n------"))
> 5. This time, the cursor will be moved down to the start of the second
> "fake" line (right before the `-----'). Furthermore, it is impossible
> to place it at the position we had in item 3, it just jumps straight
> from the first `e' to the first `-', skipping the actual newline char.
> 
> If I can place the cursor on the newline in the first scenario, why
> can't I do so in the second?

Because we have special support for cursor positioning on display
strings that end in a newline (AFAIR, since some packages that change
how a newline is displayed needed that).

> Is there a way around this?

Why do you need it?  What is your real-life use case?

> I tried adding a '(cursor t) property to the "\n" substring, but
> nothing changed.

You cannot put a 'cursor' property on a newline, because a newline
leaves no glyphs on display.  To be effective, the 'cursor' property
needs to be placed on a character that produces some glyph.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Aug 2015 15:07:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 11:07:33 2015
Received: from localhost ([127.0.0.1]:41959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZNjF7-00024M-DD
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 11:07:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43506)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNjF5-00024C-AG
 for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 11:07:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNjF4-0000gg-6O
 for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 11:07:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46714)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNjF4-0000gZ-31
 for submit <at> debbugs.gnu.org; Fri, 07 Aug 2015 11:07:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57011)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNjF3-0002t9-2J
 for bug-gnu-emacs@HIDDEN; Fri, 07 Aug 2015 11:07:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNjF2-0000fy-9h
 for bug-gnu-emacs@HIDDEN; Fri, 07 Aug 2015 11:07:28 -0400
Received: from mail-la0-x229.google.com ([2a00:1450:4010:c03::229]:36285)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <arturmalabarba@HIDDEN>) id 1ZNjF2-0000fm-17
 for bug-gnu-emacs@HIDDEN; Fri, 07 Aug 2015 11:07:28 -0400
Received: by lagz9 with SMTP id z9so23725848lag.3
 for <bug-gnu-emacs@HIDDEN>; Fri, 07 Aug 2015 08:07:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:reply-to:sender:date:message-id:subject:from:to
 :content-type; bh=5UY9JYHu0jEQYBN3jHbaV256p8koeHefXFks8fA2KNY=;
 b=qOwVckLULxQ6CRt8XqngtbOUsndJU5XsNFeCZ/6g3mvPYbFh4KazlhFpJJBBrFGMO1
 GfGEeAKgMLpM0on6fwEyTe6Im0/ShoLrjTQGBwSXdJVux1c33HseLxl3iCGDYKP23rSw
 pvdE6f7YmwDnLI6CApvcLZcZGsYIryJZifvnLh4289mmEjrk54UTXV+zo3V7HLR3dn4m
 q6yeNj53FXRMZ3mg26dimmh9PjoKDzkyuh6dhn3Ii6R16FFq8Co10ZnohM10ifeCzXvj
 +DMUjp967CAlzN9XD7Xgfj8YLeF+ubPO0/zdr7OepD64y/C+mVXRaPnj4PeSap4t6EtV
 qa8g==
MIME-Version: 1.0
X-Received: by 10.152.4.163 with SMTP id l3mr8054132lal.35.1438960047231; Fri,
 07 Aug 2015 08:07:27 -0700 (PDT)
Received: by 10.25.134.139 with HTTP; Fri, 7 Aug 2015 08:07:27 -0700 (PDT)
Date: Fri, 7 Aug 2015 16:07:27 +0100
X-Google-Sender-Auth: zs9hE5NZWhfWNM_uCE1NDIgoIBY
Message-ID: <CAAdUY-LkX_X2Qvo1R=fbrYNm4D6z3YLuEsW-DiV_amso6po8vw@HIDDEN>
Subject: 25.0.50;
 Cursor position behaves unpredictably on the 'display text property
From: Artur Malabarba <bruce.connor.am@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: bruce.connor.am@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

1. Type `single line' into an empty buffer, and place the cursor at the space.
2. Hit M-: and evaluate the following snippet
    (add-text-properties (point) (1+ (point)) '(display "\n"))
3. When the space in the middle gets "turned" into a newline, the
cursor is left where it was (at the fake end of the first line, right
after the word `single').
4. Now follow the same steps on a new buffer, but evalate this instead:
(add-text-properties (point) (1+ (point)) '(display "\n------"))
5. This time, the cursor will be moved down to the start of the second
"fake" line (right before the `-----'). Furthermore, it is impossible
to place it at the position we had in item 3, it just jumps straight
from the first `e' to the first `-', skipping the actual newline char.

If I can place the cursor on the newline in the first scenario, why
can't I do so in the second?
Is there a way around this?
I tried adding a '(cursor t) property to the "\n" substring, but
nothing changed.


Cheers,
Artur




Acknowledgement sent to bruce.connor.am@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21207; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 8 Aug 2015 03:45:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.