From: JD Smith <jdtsmith@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 70637@debbugs.gnu.org
Subject: bug#70637: :box vertical bar artifacts at 'display boundaries
Date: Sat, 11 May 2024 13:16:54 -0400 [thread overview]
Message-ID: <50FDEC29-AFDE-4BBB-A332-C2E346357E48@gmail.com> (raw)
In-Reply-To: <86cyps3ctb.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]
> On May 11, 2024, at 5:41 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: JD Smith <jdtsmith@gmail.com>
>> Date: Thu, 9 May 2024 09:31:28 -0400
>> Cc: 70637@debbugs.gnu.org
>>
>> I presume this is a more general issue than just :box. One idea is to add a warning to the Elisp section "Display
>> Specs That Replace The Text", perhaps at the end:
>>
>> Note: certain `face' attributes such as `:box' can lead to display artifacts when applied to the replacing
>> text in a `display' specification. These attributes may be incorrectly merged with adjacent non-`display'
>> `face' properties. This can be mitigated by applying the `face' attributes directly to the text being
>> replaced, rather than (or in addition to) the `display' replacement text itself.
>
> Actually, this is specific to :box, since only for that attribute we
> need to determine the beginning and the end of the box.
>
>> Maybe a bit too wordy.
>
> Yes, I agree. If you can reword it to be specific to :box and to
> include an example, I think it would be good.
Feel free to edit:
Note: Using `:box' attributes in replacing `display' text adjacent to normal text with the same `:box' styling can lead to display artifacts. These can be avoided by applying the `:box' attribute directly to the text being replaced, rather than (or in addition to) the `display' replacement text itself.
;; Causes :box artifacts from the cursor
(progn
(put-text-property 1 2 'display (propertize " [" 'face '(:box t)))
(put-text-property 2 3 'face '(:box t))
(put-text-property 3 4 'display (propertize "] " 'face '(:box t))))
;; No :box artifacts
(progn
(add-text-properties 1 2 '(face (:box t) display " ["))
(put-text-property 2 3 'face '(:box t))
(add-text-properties 3 4 '(face (:box t) display "] ")))
[-- Attachment #2: Type: text/html, Size: 3664 bytes --]
next prev parent reply other threads:[~2024-05-11 17:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 0:50 bug#70637: :box vertical bar artifacts at 'display boundaries JD Smith
2024-04-29 11:40 ` Eli Zaretskii
2024-04-29 12:01 ` JD Smith
2024-04-29 13:12 ` Eli Zaretskii
2024-04-29 15:19 ` JD Smith
2024-04-29 15:34 ` Eli Zaretskii
2024-05-09 7:36 ` Eli Zaretskii
2024-05-09 13:31 ` JD Smith
2024-05-11 9:41 ` Eli Zaretskii
2024-05-11 17:16 ` JD Smith [this message]
2024-05-18 9:17 ` 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=50FDEC29-AFDE-4BBB-A332-C2E346357E48@gmail.com \
--to=jdtsmith@gmail.com \
--cc=70637@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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).