Subject: Re: bug#25856: 25.1; after-string of overlay may not be displayed

From: Eli Zaretskii <[email-masked]>
Date: Fri, 24 Feb 2017 10:34:17 +0200

tags 25856 notabug
thanks

> From: [email-masked]
> Date: Fri, 24 Feb 2017 15:19:06 +0900
> 
> Evaluating the form below, I expect to see 4 <BeforeAfter>.
> It displays 3 <Before> and 1 <BeforeAfter>.
> If before-string is not specified, 4 <After> are displayed.
> 
> (dotimes (i 4)
>   (let ((p (point)) ol)
>     (insert "<HIDDEN>\n")
>     (setq ol (make-overlay (1+ p) (- (point) 2)))
>     (cond ((= i 0) (overlay-put ol 'display ""))
>           ((= i 1) (overlay-put ol 'invisible t))
>           ((= i 2) (put-text-property (1+ p) (- (point) 2) 'display ""))
>           ((= i 3) (put-text-property (1+ p) (- (point) 2) 'invisible t)))
>     (overlay-put ol 'before-string "Before")
>     (overlay-put ol 'after-string  "After")
>     (overlay-put ol 'evaporate t)))

I don't see any bug here.  You are making text disappear using
different methods, and each one has its implications wrt before- and
after-string.