Subject: bug#74536: closed (Re: bug#74536: 30.0.50; undocumented box behaviour in faces)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 30 Nov 2024 10:46:02 +0000

Your bug report

#74536: 30.0.50; undocumented box behaviour in faces

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
74536: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74536
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#74536: 30.0.50; undocumented box behaviour in faces
From: Eli Zaretskii <[email-masked]>
To: Al Haji-Ali <[email-masked]>
Cc: [email-masked]
Date: Sat, 30 Nov 2024 12:44:56 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Al Haji-Ali <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 25 Nov 2024 21:08:48 +0000
> 
> 
> Thanks for the response.
> 
> On 25/11/2024, Eli Zaretskii wrote:
> >> I find this behaviour, if intended, sometimes helpful as it allows one to have a one-sided border. Though it would be helpful if the exact mechanism is documented.
> >
> > What mechanism would you like to be documented?
> >
> 
> Exactly what you explained:

Done.

Subject: 30.0.50; undocumented box behaviour in faces
From: Al Haji-Ali <[email-masked]>
To: [email-masked]
Date: Mon, 25 Nov 2024 19:34:41 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

The output of the following code is

--8<---------------cut here---------------start------------->8---
(progn
  (fundamental-mode)
  (insert (concat "\n"
                  (propertize "hello" 'face '(:box (:line-width (3 . 0) :color "red")))
                  (propertize " again" 'face '(:box (:line-width (3 . 0) :color "yellow")))
                  (propertize " other" 'face '(:box (:line-width (3 . 0) :color "green"))))
          "\n"))
--8<---------------cut here---------------end--------------->8---

|hello again other|

where the left border is red and the right one is green and the yellow border is completely hidden. Having negative line-width produces the same output.

It seems that one cannot have multiple adjacent borders unless one has some text in between without a border, like this
--8<---------------cut here---------------start------------->8---
(progn
  (fundamental-mode)
  (insert (concat "\n"
                  (propertize "hello" 'face '(:box (:line-width (3 . 0) :color "red")))
                  " "
                  (propertize " again" 'face '(:box (:line-width (3 . 0) :color "yellow")))
                  (propertize " othe " 'face '(:box (:line-width (3 . 0) :color "green"))))
          "\n"))
--8<---------------cut here---------------end--------------->8---

produces

|hello| | again other|

with (red, red, yellow, green) borders.

I find this behaviour, if intended, sometimes helpful as it allows one to have a one-sided border. Though it would be helpful if the exact mechanism is documented.

In any case, I was also originally expecting, and wanting, an output like this
|hello| again | other|

with `(red, yellow, green, green)` and no text in between, but it seems there is no way to achieve such output? Is that correct?

-- Al