GNU bug report logs - #20607
24.5; Problem with overlays at same position but in different windows

Previous Next

Package: emacs;

Reported by: Oleh Krehel <ohwoeowho <at> gmail.com>

Date: Mon, 18 May 2015 18:36:02 UTC

Severity: normal

Found in version 24.5

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20607 in the body.
You can then email your comments to 20607 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20607; Package emacs. (Mon, 18 May 2015 18:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleh Krehel <ohwoeowho <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 18 May 2015 18:36:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Problem with overlays at same position but in different windows
Date: Mon, 18 May 2015 20:29:10 +0200
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20607; Package emacs. (Mon, 18 May 2015 19:00:06 GMT) Full text and rfc822 format available.

Message #8 received at 20607 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: 20607 <at> debbugs.gnu.org
Subject: Re: bug#20607: 24.5;
 Problem with overlays at same position but in different windows
Date: Mon, 18 May 2015 21:59:26 +0300
> From: Oleh Krehel <ohwoeowho <at> gmail.com>
> Date: Mon, 18 May 2015 20:29:10 +0200
> 
> 
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20607; Package emacs. (Mon, 18 May 2015 19:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 20607 <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20607 <at> debbugs.gnu.org
Subject: Re: bug#20607: 24.5;
 Problem with overlays at same position but in different windows
Date: Mon, 18 May 2015 21:04:30 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Oleh Krehel <ohwoeowho <at> gmail.com>
>> Date: Mon, 18 May 2015 20:29:10 +0200
>> 
>> 
>> 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.

Split the frame into 3 windows, two of them on *scratch*. In the third
window, evaluate this:

(let* ((wl (window-list))
       (w1 (nth 1 wl))
       (w2 (nth 2 wl))
       o1 o2)
  (with-current-buffer "*scratch*"
    (insert "asdf"))
  (with-selected-window w1
    (setq o1 (make-overlay 1 2))
    (overlay-put o1 'window w1)
    (overlay-put o1 'display "ok"))
  (with-selected-window w2
    (setq o2 (make-overlay 1 3))
    (overlay-put o2 'window w2)
    (overlay-put o2 'display "try")))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20607; Package emacs. (Mon, 18 May 2015 19:15:02 GMT) Full text and rfc822 format available.

Message #14 received at 20607 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: ohwoeowho <at> gmail.com
Cc: 20607 <at> debbugs.gnu.org
Subject: Re: bug#20607: 24.5;
 Problem with overlays at same position but in different windows
Date: Mon, 18 May 2015 22:14:20 +0300
> Date: Mon, 18 May 2015 21:59:26 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 20607 <at> debbugs.gnu.org
> 
> > From: Oleh Krehel <ohwoeowho <at> gmail.com>
> > Date: Mon, 18 May 2015 20:29:10 +0200
> > 
> > 
> > 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.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 19 May 2015 15:44:02 GMT) Full text and rfc822 format available.

Notification sent to Oleh Krehel <ohwoeowho <at> gmail.com>:
bug acknowledged by developer. (Tue, 19 May 2015 15:44:03 GMT) Full text and rfc822 format available.

Message #19 received at 20607-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: ohwoeowho <at> gmail.com
Cc: 20607-done <at> debbugs.gnu.org
Subject: Re: bug#20607: 24.5;
 Problem with overlays at same position but in different windows
Date: Tue, 19 May 2015 18:43:04 +0300
> Date: Mon, 18 May 2015 22:14:20 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 20607 <at> 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.
> > 
> > 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).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20607; Package emacs. (Tue, 19 May 2015 15:57:02 GMT) Full text and rfc822 format available.

Message #22 received at 20607-done <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20607-done <at> debbugs.gnu.org
Subject: Re: bug#20607: 24.5;
 Problem with overlays at same position but in different windows
Date: Tue, 19 May 2015 17:50:27 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> 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).

Thanks, I confirm that the change works fine for me.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Jun 2015 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 63 days ago.

Previous Next


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