Subject: Re: before-string property has no effect if display property is empty

From: Chong Yidong <[email-masked]>
Date: Sat, 27 Jun 2009 00:25:08 -0400

> The documentation leads me to believe that the before-string and
> display properties of an overlay should be orthogonal.  However, the
> before-string is not displayed if the display property is the empty
> string.

>   (let ((buf (get-buffer-create "foo")))
>     (with-current-buffer buf
>       (display-buffer buf)
>       (erase-buffer)
>       (dolist (o (overlays-in (point-min) (point-max)))
>         (delete-overlay o))
>       (insert "ABC")
>       (let ((o (make-overlay 2 3))
>             (s (make-string 3 ?X)))
>         (overlay-put o 'display "")
>         (overlay-put o 'before-string s))))

> You will see the 'foo' window pop up and in the window you will see
> 'AC'.  I expected that instead 'AXXXC' would be shown.

This bug is already fixed in current CVS (and in the Emacs 23.1 branch).