GNU bug report logs - #1208
overlay after-string and adjacent overlays with same string

Previous Next

Package: emacs;

Reported by: rms <at> gnu.org

Date: Sun, 19 Oct 2008 05:10:04 UTC

Severity: normal

Tags: wontfix

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.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 1208 in the body.
You can then email your comments to 1208 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1200; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: emacs-pretest-bug <at> gnu.org
Subject: Two more overlay display bugs
Date: Sun, 19 Oct 2008 01:00:36 -0400
Here are bugs that were reported a year ago
which I think should not be forgotten.

To: bug-gnu-emacs <at> gnu.org
From: Joe Wells <jbw <at> macs.hw.ac.uk>
Date: Sat, 20 Oct 2007 06:32:19 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Subject: two display bugs involving interactions between after-string and
	display properties of adjacent overlays

Here are two more display bugs I found while trying to improve the
code in tex-fold.el in AUCTeX.

These bugs involve interactions between after-string and display
properties of adjacent overlays.

I'm assuming this macro in my reproduction code below:

  (defmacro test-in-fresh-buffer-and-window (&rest body)
    `(progn
       (delete-other-windows)
       (kill-buffer (get-buffer-create "xyzzy"))
       (let ((xyzzy-buf (get-buffer-create "xyzzy")))
         (set-buffer xyzzy-buf)
         (display-buffer xyzzy-buf)
         ,@body
         )))

BUG #1:  An overlay's after-string property that would appear at the
end of the buffer is not displayed, if the same overlay also has a
display property and an immediately preceding overlay also has an
after-string property.  (Putting extra characters at the end of the
buffer works around this bug.)

Reproduce with this expression:

  (test-in-fresh-buffer-and-window
   (insert "AB")
   (let ((o1 (make-overlay 1 2))
         (o2 (make-overlay 2 3)))
     (overlay-put o1 'after-string "1")
     (overlay-put o2 'after-string "2")
     (overlay-put o2 'display "b")
     ))

The above expression should display ?A1b2?.
The above expression wrongly actually displays ?A1b?.

BUG #2:  An overlay's display property and after-string property are
not displayed if an immediately following overlay shares the same Lisp
string as its display property.  (Using two distinct display strings
with identical contents works around the bug.)

Reproduce with this expression:

  (test-in-fresh-buffer-and-window
   (insert "ABCD")
   (let ((o1 (make-overlay 2 3))
         (o2 (make-overlay 3 4))
         (s #1=" "))
     (overlay-put o1 'after-string "1")
     (overlay-put o1 'display #1#)
     (overlay-put o2 'display #1#)))

The above expression should display ?A 1 D?.
The above expression wrongly actually displays ?A D?.

I hope these bug reports are helpful.

Joe

======================================================================
In GNU Emacs 22.1.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-06-27 on artemis
Windowing system distributor `The X.Org Foundation', version 11.0.70000000
configured using `configure  '--prefix=/home/jbw/local2' '--enable-debug' '--disable-nls' '--with-x-toolkit=gtk' 'CFLAGS=-O0 -g3 -ggdb''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: jbw
  value of $LANG: nil
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Minor modes in effect:
  TeX-source-specials-mode: t
  outline-minor-mode: t
  desktop-save-mode: t
  url-handler-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t





bug 1200 cloned as bug 1208. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sun, 19 Oct 2008 21:15:03 GMT) Full text and rfc822 format available.

Changed bug title to `overlay after-string and adjacent overlays with same string' from `Two more overlay display bugs'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sun, 19 Oct 2008 21:15:03 GMT) Full text and rfc822 format available.

Information stored:
bug#1208; Package emacs. Full text and rfc822 format available.

Message #12 received at 1208-quiet <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 1208-quiet <at> debbugs.gnu.org
Subject: Re: Two more overlay display bugs
Date: Sun, 19 Oct 2008 17:17:41 -0400
This was cloned from 1200, since 1200 contains two bugs.

> BUG #1:  An overlay's after-string property that would appear at the
> end of the buffer is not displayed, if the same overlay also has a
> display property and an immediately preceding overlay also has an
> after-string property.  (Putting extra characters at the end of the
> buffer works around this bug.)

This is fixed (see bug#1200).

> BUG #2:  An overlay's display property and after-string property are
> not displayed if an immediately following overlay shares the same Lisp
> string as its display property.  (Using two distinct display strings
> with identical contents works around the bug.)

This bug, 1208, is for this issue.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1208; Package emacs. Full text and rfc822 format available.

Message #15 received at 1208 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 1208 <at> debbugs.gnu.org
Subject: Re: bug#1208: overlay after-string and adjacent overlays with same string
Date: Sun, 19 Oct 2008 17:30:00 -0400
tags 1208 wontfix
stop

> BUG #2:  An overlay's display property and after-string property are
> not displayed if an immediately following overlay shares the same Lisp
> string as its display property.  (Using two distinct display strings
> with identical contents works around the bug.)

Tagging as wontfix based on the previous discussion:

http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00179.html

    This occurs because, as stated in the Emacs Lisp manual, all
    consecutive characters that have the same Lisp object as their
    `display' property are replaced as a single unit.  In this case, it's
    somewhat ambiguous what the behavior should be, but after looking at
    the code I think the behavior you suggest would be much more difficult
    to implement (and slower) than the current behavior.

    Furthermore, you can trivially obtain the behavior you want by making
    a copy of the string using copy-sequence, so that the two display
    strings are different Lisp objects.

    Therefore, let's leave this alone.




Tags added: wontfix Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sun, 19 Oct 2008 21:40:05 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 1208 <at> debbugs.gnu.org and rms <at> gnu.org Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 02 Aug 2011 16:05:01 GMT) Full text and rfc822 format available.

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

This bug report was last modified 13 years and 347 days ago.

Previous Next


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