I'm interested in displaying adjacent boxed text using the :box t
face property in the following manner for adjacent text:
Is there an accepted convention for delimiting/isolating text properties between otherwise uninterrupted text?
For review (from Face Attributes):
:box
Whether or not a box should be drawn around characters, its color, the width of the box lines, and 3D appearance.
Since face and text properties are attached to characters this particular face property is sort of an odd member among text/face properties. Almost all other properties I can think of would not be expected to make a visual distinction that a text property was "interrupted" between adjacent visible characters. Whereas with :box
you may wish to have a box boundary between respective "boxes". I can also imagine wanting to "reset" a stipple pattern (thereby potentially interrupting the tiling pattern). If you can think of any other circumstances please comment.
The only approach that came to mind other than using a null character (which doesn't work) was to include an arbitrary string and mark it invisible:
(insert
(concat
(propertize "foo"
'font-lock-ignore t
'face '(:box t))
(propertize "X"
'invisible t)
(propertize "bar"
'font-lock-ignore t
'face '(:box t))))
Incidentally I suspect that I found a rendering bug in emacs while considering this. The following code renders as follows, but transitions to the desired rendering when the cursor moves to adjacent to the invisible character.