Subject: bug#18285: 24.3.92; A combination of `display' on text and `invisible' and `before/after-string' leads to the before/after string being displayed twice

From: Dmitry Gutov <[email-masked]>
Date: Sat, 23 Aug 2014 00:01:59 +0400

On 08/22/2014 05:31 PM, Eli Zaretskii wrote:

> If that's what people want, it's an easy change.

Can't say for all people, but it seems like a good idea to me.

> But the question is,
> won't that cause overlay strings not to be displayed in some cases?

The reverse, maybe? Making `invisible' inactive means something might 
become visible, right? But I'd have to see some examples.

>> If `display' takes priority over `invisible', I would expect
>>
>> (let ((pt (point)))
>>     (insert (propertize "a" 'display "bbb"))
>>     (let ((o (make-overlay pt (point))))
>>       (overlay-put o 'after-string "foo\nbar")))
>>
>> and
>>
>> (let ((pt (point)))
>>     (insert (propertize "a" 'display "bbb"))
>>     (let ((o (make-overlay pt (point))))
>>       (overlay-put o 'invisible t)
>>       (overlay-put o 'after-string "foo\nbar")))
>>
>> to be rendered the same.
>
> The question is what would you expect from the second example, if it
> used before-string there?  Should the before-string be displayed or
> shouldn't it?  Since invisible makes the beginning of the overlay
> disappear, under your suggestion it won't be displayed.

I think I'm suggesting the reverse, no? And anyway, with the current 
logic, both examples render the `before-string' if I use it there just 
fine. I see no reason for that that to change.