GNU bug report logs - #40687
Missing right border on composed text used in 'display property

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Fri, 17 Apr 2020 19:45:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 40687 <at> debbugs.gnu.org
Subject: bug#40687: Missing right border on composed text used in 'display property
Date: Fri, 17 Apr 2020 17:11:41 -0400
On 17/04/2020 16.33, Stephen Berman wrote:
> On Fri, 17 Apr 2020 15:44:36 -0400 Clément Pit-Claudel <cpitclaudel <at> gmail.com> wrote:
> 
>> Hi all,
>>
>> With the following sample code, I observe the results shown in the attached image.  The first two "ab" have a border, but the last one only has three-quarters of its border: the right side is missing.
>>
>> (defface my-button
>>   '((t :box(:line-width -4 :style released-button)
>>        :background"lightgrey":foreground"black"))
>>   "Button face")
>>
>> (with-current-buffer (get-buffer-create "button")
>>   (insert "\n")
>>   (insert (propertize "ab" 'face 'my-button))
>>   (insert " ")
>>   (insert (propertize (compose-chars ?a '(Br . Bl) ?b) 'face 'my-button))
>>   (insert " ")
>>   (insert (propertize "ab" 'display (compose-chars ?a '(Br . Bl) ?b) 'face 'my-button))
>>   (insert " ")
>>   (pop-to-buffer-same-window (current-buffer)))
> 
> I see the same thing, but I noticed that when you add a space to
> composed characters of the display property, ie.:
>  (compose-chars ?a '(Br . Bl) ?b ? )
> then right side border appears.

IIUC, this space is read as the number 32 and considered as the encoded version of the rule (tr . br).  Indeed, this gives the same result:

  (insert (propertize "ab" 'display (compose-chars ?a '(Bc . Bc) ?b '(tr . br)) 'face 'my-button))

But is that even a valid composition rule?It seems to break with non-trivial composition, like the following:

  (insert (propertize "ab" 'display (compose-chars ?a '(Bc . Bc) ?b ? ) 'face 'my-button))

(instead of being stacked, a and b are side by side)




This bug report was last modified 5 years and 28 days ago.

Previous Next


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