unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 40687@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	[thread overview]
Message-ID: <38186fd8-f181-4299-660b-252f7f8c1e23@gmail.com> (raw)
In-Reply-To: <875zdxvolv.fsf@gmx.net>

On 17/04/2020 16.33, Stephen Berman wrote:
> On Fri, 17 Apr 2020 15:44:36 -0400 Clément Pit-Claudel <cpitclaudel@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)





  reply	other threads:[~2020-04-17 21:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 19:44 bug#40687: Missing right border on composed text used in 'display property Clément Pit-Claudel
2020-04-17 20:33 ` Stephen Berman
2020-04-17 21:11   ` Clément Pit-Claudel [this message]
2020-04-23 15:49   ` Eli Zaretskii
2020-04-23 15:48 ` Eli Zaretskii
2020-04-23 20:07   ` Stephen Berman
2020-04-23 20:25     ` Clément Pit-Claudel
2020-04-24  6:43       ` Eli Zaretskii
2020-04-24  6:33     ` Eli Zaretskii
2020-04-24 12:10   ` Robert Pluim
2020-04-24 12:26     ` Eli Zaretskii
2020-04-24 14:01       ` Clément Pit-Claudel
2020-04-24 14:06         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38186fd8-f181-4299-660b-252f7f8c1e23@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=40687@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).