Subject: bug#20607: closed (Re: bug#20607: 24.5; Problem with overlays at same position but in different windows)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 19 May 2015 15:44:03 +0000

Your bug report

#20607: 24.5; Problem with overlays at same position but in different windows

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20607: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20607
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20607: 24.5; Problem with overlays at same position but in different windows
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 19 May 2015 18:43:04 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Mon, 18 May 2015 22:14:20 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > > Suppose I have two windows, WND1 and WND2, both displaying the same
> > > buffer. In WND1, there's an overlay from 1 to 2 with window property
> > > WND1 and display "ab". In WND2, there's an overlay from 1 to 3 with
> > > window property WND2 and display "abc".
> > > 
> > > Instead of the expected, I see "ab" in WND1, but "abcabc" in WND2.  When
> > > I `move-overlay' in the first window to 1-3, the glitch disappears, but
> > > I actually want the overlay to be 1-2, not 1-3. If I have to make it
> > > 1-3, I'd have to modify the display as well to include one more
> > > character from the buffer. I think it's better to fix the overlay logic
> > > rather than go for this work-around.
> > 
> > Please show the code to reproduce this.
> 
> Actually, you need not bother: I see it here.
> 
> For now, all I can say is that this is very old: Emacs 22 already
> behaves like that.  I think the problem is that the display engine
> bumps into the same overlay twice while walking the buffer, but I need
> to take a closer look to be sure.

Fixed in commit 18338b1, which also includes a fix to a related subtle
problem with cursor movement in this case (you couldn't put point at
position 2 in WND1 window: it would be "adjusted" to position 3).

Subject: 24.5; Problem with overlays at same position but in different windows
From: Oleh Krehel <[email-masked]>
To: [email-masked]
Date: Mon, 18 May 2015 20:29:10 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Suppose I have two windows, WND1 and WND2, both displaying the same
buffer. In WND1, there's an overlay from 1 to 2 with window property
WND1 and display "ab". In WND2, there's an overlay from 1 to 3 with
window property WND2 and display "abc".

Instead of the expected, I see "ab" in WND1, but "abcabc" in WND2.  When
I `move-overlay' in the first window to 1-3, the glitch disappears, but
I actually want the overlay to be 1-2, not 1-3. If I have to make it
1-3, I'd have to modify the display as well to include one more
character from the buffer. I think it's better to fix the overlay logic
rather than go for this work-around.

Oleh