GNU bug report logs - #65105
Reusing the same string as 'display on consecutive characters evades display

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Sat, 5 Aug 2023 18:36:01 UTC

Severity: normal

Tags: notabug

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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#65105: closed (Reusing the same string as 'display on
 consecutive characters evades display)
Date: Sun, 06 Aug 2023 04:56:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 06 Aug 2023 07:55:25 +0300
with message-id <83pm40rcqq.fsf <at> gnu.org>
and subject line Re: bug#65105: Reusing the same string as 'display on consecutive characters evades display
has caused the debbugs.gnu.org bug report #65105,
regarding Reusing the same string as 'display on consecutive characters evades display
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
65105: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65105
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: JD Smith <jdtsmith <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Reusing the same string as 'display on consecutive characters evades
 display
Date: Sat, 5 Aug 2023 14:35:23 -0400
Evaluate:

(let ((s1 "test1")
      (s2 "test2"))
  (insert "\n"
          (propertize " " 'display s1)
          (propertize " " 'display s1)
          (propertize " " 'display s2)
          (propertize " " 'display s1)))


The first space display does not take effect, since the s1 string is used for two consecutive characters.  This has a practical impact for font-lock backends that use the ‘display text-property and would like to minimize string allocation.  

Tested Emacs 27/28/29.



[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: JD Smith <jdtsmith <at> gmail.com>
Cc: dmitry <at> gutov.dev, 65105-done <at> debbugs.gnu.org
Subject: Re: bug#65105: Reusing the same string as 'display on consecutive
 characters evades display
Date: Sun, 06 Aug 2023 07:55:25 +0300
> From: JD Smith <jdtsmith <at> gmail.com>
> Date: Sat, 5 Aug 2023 18:49:11 -0400
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  65105 <at> debbugs.gnu.org
> 
> That’s probably the right approach.  Or even simpler, allocate two identical strings and alternate.  Thanks.

And with that, I'm closing this bug.


This bug report was last modified 1 year and 290 days ago.

Previous Next


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