GNU bug report logs - #81346
32.0.50; `insert' sometimes does not insert text as expected

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Markus Triska <triska@HIDDEN>; Keywords: notabug; dated Thu, 2 Jul 2026 20:10:06 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) notabug. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 81346 <at> debbugs.gnu.org:


Received: (at 81346) by debbugs.gnu.org; 3 Jul 2026 06:35:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 03 02:35:09 2026
Received: from localhost ([127.0.0.1]:49994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wfXUO-0003kC-Ss
	for submit <at> debbugs.gnu.org; Fri, 03 Jul 2026 02:35:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33674)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>)
 id 1wfXUI-0003iv-Ep; Fri, 03 Jul 2026 02:35:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1wfXUB-000168-LK; Fri, 03 Jul 2026 02:34:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=miSlIRtzgmeB3d1jXAOL2hBvrAs+9hoxcEcJNCYusls=; b=DwsrXLPlF4Knjc8zdyxL
 pnMV6lsQYLAfMaH1QprR2s4vSOO+W5dQVM/Sey1Sp21/4IAVO/prn60/7fsP8fwThHBEiRR9xJJ6R
 1SAMtk0IwwXsRXiOu5ahoofCVZIp7vZU3/PohI1gtU6NWgJr5J40xuRfUT/F9MgJnjgwOs17ijEwu
 pMvsMATFh5BcYmQWwSWvp+IjhFLMD8tk4HQCz1TtSzBSWEsbatOQqqIl7dbiVuE1bAUdgmw1bydRm
 Qk40h+fjHKuFOPJ5SKO5rmOjJp18HRAJMZRuKKgPXWXloC5fDKNeeQ3HlboBXY/PdcVKRGGny6rk2
 swDMXw59TiERZQ==;
Date: Fri, 03 Jul 2026 09:34:47 +0300
Message-Id: <86a4s8bmyg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: triska@HIDDEN
In-Reply-To: <86bjcobnrh.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 03
 Jul 2026 09:17:22 +0300)
Subject: Re: bug#81346: 32.0.50;
 `insert' sometimes does not insert text as expected
References: <20260702201506.939E1F08652@triska-ser8>
 <87v7ax16mj.fsf@HIDDEN> <874iihm8bo.fsf@HIDDEN>
 <86bjcobnrh.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81346
Cc: schwab@HIDDEN, 81346 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 81346 notabug
thanks

> Cc: schwab@HIDDEN, 81346 <at> debbugs.gnu.org
> Date: Fri, 03 Jul 2026 09:17:22 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Cc: 81346 <at> debbugs.gnu.org
> > From: Markus Triska <triska@HIDDEN>
> > Date: Thu, 02 Jul 2026 22:43:07 +0200
> > 
> > Andreas Schwab <schwab@HIDDEN> writes:
> > 
> > When I evaluate the following form, then the right edge of space that is
> > meant to be displayed in a box is not shown.
> > 
> > However, when I move cursor between the inserted spaces, then the right
> > border is at last drawn. It seems it should be drawn from the beginning?
> > 
> > In the section you point to, there is also a note about the :box face
> > attribute, but it seems not to apply to this specific situation: In this
> > example, an expected border is not shown immediately after inserting,
> > but it is shown when moving the cursor across the inserted text.
> > 
> > Thank you and all the best,
> > Markus
> > 
> > (progn
> >   (font-lock-mode 0)
> >   (insert "\n")
> >   (insert (propertize " "
> >                       'display '(space :width (120))
> >                       'face '(:box (:line-width (12 . -1) :color "purple"))))
> >   (insert (propertize " "
> >                       'display '(space :width (120))
> >                       'face '(:box (:line-width (12 . -1) :color "purple"))))
> >   (insert "\n"))
> 
> Don't do that, it is not supported (because the face-with-box property
> doesn't change when you go from one buffer position to the other).
> This minor variant produces the expected effect:
> 
>   (progn
>     (font-lock-mode 0)
>     (insert "\n")
>     (insert (propertize " "
> 			'display '(space :width (120))
> 			'face '(:box (:line-width (12 . -1) :color "purple")))
> 	     "X")
>     (insert (propertize " "
> 			'display '(space :width (120))
> 			'face '(:box (:line-width (12 . -1) :color "purple"))))
>     (insert "\n"))
> 
> IOW, the buffer text should have something between the two boxes.
> 
> If you don't want the separating text to show on display, you can make
> it invisible, like this:
> 
>   (progn
>     (font-lock-mode 0)
>     (insert "\n")
>     (insert (propertize " "
> 			'display '(space :width (120))
> 			'face '(:box (:line-width (12 . -1) :color "purple")))
> 	    (propertize "X" 'invisible t))
>     (insert (propertize " "
> 			'display '(space :width (120))
> 			'face '(:box (:line-width (12 . -1) :color "purple"))))
>     (insert "\n"))
> 

From the ELisp manual:

     If you use the ‘:box’ face attribute on strings displayed instead
     of buffer text via the ‘display’ text property, special
     considerations might apply if the surrounding buffer text also has
     the ‘:box’ face attribute.  *Note Replacing Specs::.  Also note
     that the vertical lines of the box are only drawn when ‘:box’
     attribute changes from ‘nil’ to non-‘nil’ or vice versa; two
     consecutive face properties with a non-‘nil’ ‘:box’ attribute will
     be displayed without the vertical line between them.

So even the last snippet above also shouldn't be expected to behave
100% correctly.  You really need to have text on display without the
box property between two stretches of text with the box property, to
have this work correctly, as in the first variant above.  This is due
to the way this feature is implemented in Emacs, so it's unlikely to
change unless the (quite tricky) implementation is rewritten in a
different way.  Until then, this is not a bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81346; Package emacs. Full text available.

Message received at 81346 <at> debbugs.gnu.org:


Received: (at 81346) by debbugs.gnu.org; 3 Jul 2026 06:17:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 03 02:17:41 2026
Received: from localhost ([127.0.0.1]:49948 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wfXDW-0001Wu-IO
	for submit <at> debbugs.gnu.org; Fri, 03 Jul 2026 02:17:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53730)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wfXDS-0001Vf-I2
 for 81346 <at> debbugs.gnu.org; Fri, 03 Jul 2026 02:17:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1wfXDK-000496-LV; Fri, 03 Jul 2026 02:17:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=oO7wYdpVOnKK8Q5liXlPl8xuLbUsiOPYhl9VrPONpAc=; b=k1HAIpu7WO3q
 XNpdTxE29pvJYvPwrtDZrY3LqxxFEjyYrbkXmSutZTe1YrOyxg2luOIz7KT3oTEW0qzQAvDc0j8du
 pO3mdUGz+c9btr8Eh+rZA5qqqFI7SSRiSISK4KFyWkaDXZnXRfp5Wr0C8/OyjGzJt3Y0MOiVW6CD1
 StjDgBs0t0rT4Y2RoGl2knNkmLw/S59nhzgHgDXATvQwcT9n5I9GhZIp28xxQNzYnJwTI9tnjW112
 92JtGPsp1PZyaIN2FcRmgGtvSeg83tI8gaDX4EgC+dugqiag89QTVulm/8YotqP6DJEdK778gVixH
 eUUtWzI7TJviBRGnRvhCpg==;
Date: Fri, 03 Jul 2026 09:17:22 +0300
Message-Id: <86bjcobnrh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Markus Triska <triska@HIDDEN>
In-Reply-To: <874iihm8bo.fsf@HIDDEN> (message from Markus Triska on Thu, 
 02 Jul 2026 22:43:07 +0200)
Subject: Re: bug#81346: 32.0.50;
 `insert' sometimes does not insert text as expected
References: <20260702201506.939E1F08652@triska-ser8>
 <87v7ax16mj.fsf@HIDDEN> <874iihm8bo.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81346
Cc: schwab@HIDDEN, 81346 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 81346 <at> debbugs.gnu.org
> From: Markus Triska <triska@HIDDEN>
> Date: Thu, 02 Jul 2026 22:43:07 +0200
> 
> Andreas Schwab <schwab@HIDDEN> writes:
> 
> When I evaluate the following form, then the right edge of space that is
> meant to be displayed in a box is not shown.
> 
> However, when I move cursor between the inserted spaces, then the right
> border is at last drawn. It seems it should be drawn from the beginning?
> 
> In the section you point to, there is also a note about the :box face
> attribute, but it seems not to apply to this specific situation: In this
> example, an expected border is not shown immediately after inserting,
> but it is shown when moving the cursor across the inserted text.
> 
> Thank you and all the best,
> Markus
> 
> (progn
>   (font-lock-mode 0)
>   (insert "\n")
>   (insert (propertize " "
>                       'display '(space :width (120))
>                       'face '(:box (:line-width (12 . -1) :color "purple"))))
>   (insert (propertize " "
>                       'display '(space :width (120))
>                       'face '(:box (:line-width (12 . -1) :color "purple"))))
>   (insert "\n"))

Don't do that, it is not supported (because the face-with-box property
doesn't change when you go from one buffer position to the other).
This minor variant produces the expected effect:

  (progn
    (font-lock-mode 0)
    (insert "\n")
    (insert (propertize " "
			'display '(space :width (120))
			'face '(:box (:line-width (12 . -1) :color "purple")))
	     "X")
    (insert (propertize " "
			'display '(space :width (120))
			'face '(:box (:line-width (12 . -1) :color "purple"))))
    (insert "\n"))

IOW, the buffer text should have something between the two boxes.

If you don't want the separating text to show on display, you can make
it invisible, like this:

  (progn
    (font-lock-mode 0)
    (insert "\n")
    (insert (propertize " "
			'display '(space :width (120))
			'face '(:box (:line-width (12 . -1) :color "purple")))
	    (propertize "X" 'invisible t))
    (insert (propertize " "
			'display '(space :width (120))
			'face '(:box (:line-width (12 . -1) :color "purple"))))
    (insert "\n"))






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81346; Package emacs. Full text available.

Message received at 81346 <at> debbugs.gnu.org:


Received: (at 81346) by debbugs.gnu.org; 2 Jul 2026 20:43:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 02 16:43:14 2026
Received: from localhost ([127.0.0.1]:44535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wfOFc-00057d-IV
	for submit <at> debbugs.gnu.org; Thu, 02 Jul 2026 16:43:14 -0400
Received: from [78.47.144.35] (port=45986 helo=metalevel.at)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <triska@HIDDEN>) id 1wfOFZ-000574-5P
 for 81346 <at> debbugs.gnu.org; Thu, 02 Jul 2026 16:43:10 -0400
Received: by metalevel.at (Postfix, from userid 1000)
 id CDF639C7B9; Thu,  2 Jul 2026 22:43:07 +0200 (CEST)
From: Markus Triska <triska@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#81346: 32.0.50;
 `insert' sometimes does not insert text as expected
References: <20260702201506.939E1F08652@triska-ser8> <87v7ax16mj.fsf@HIDDEN>
Date: Thu, 02 Jul 2026 22:43:07 +0200
In-Reply-To: <87v7ax16mj.fsf@HIDDEN> (Andreas Schwab's message of "Thu, 02
 Jul 2026 22:25:24 +0200")
Message-ID: <874iihm8bo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Andreas Schwab <schwab@HIDDEN> writes: > 42.16.1
 Display
 Specs That Replace The Text Thank you a lot! I ran into this because I tried
 to construct a smaller example that shows the following issue related to
 `insert': 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Debbugs-Envelope-To: 81346
Cc: 81346 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

Andreas Schwab <schwab@HIDDEN> writes:

> 42.16.1 Display Specs That Replace The Text

Thank you a lot!  I ran into this because I tried to construct a smaller
example that shows the following issue related to `insert':

When I evaluate the following form, then the right edge of space that is
meant to be displayed in a box is not shown.

However, when I move cursor between the inserted spaces, then the right
border is at last drawn. It seems it should be drawn from the beginning?

In the section you point to, there is also a note about the :box face
attribute, but it seems not to apply to this specific situation: In this
example, an expected border is not shown immediately after inserting,
but it is shown when moving the cursor across the inserted text.

Thank you and all the best,
Markus

(progn
  (font-lock-mode 0)
  (insert "\n")
  (insert (propertize " "
                      'display '(space :width (120))
                      'face '(:box (:line-width (12 . -1) :color "purple"))))
  (insert (propertize " "
                      'display '(space :width (120))
                      'face '(:box (:line-width (12 . -1) :color "purple"))))
  (insert "\n"))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81346; Package emacs. Full text available.

Message received at 81346 <at> debbugs.gnu.org:


Received: (at 81346) by debbugs.gnu.org; 2 Jul 2026 20:25:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 02 16:25:33 2026
Received: from localhost ([127.0.0.1]:44346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wfNyV-0002ok-Vl
	for submit <at> debbugs.gnu.org; Thu, 02 Jul 2026 16:25:33 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:48313)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <whitebox@HIDDEN>)
 id 1wfNyS-0002nH-EI
 for 81346 <at> debbugs.gnu.org; Thu, 02 Jul 2026 16:25:30 -0400
Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9])
 by mail-out.m-online.net (Postfix) with ESMTP id 4grpKf2XCyz1r5hv;
 Thu,  2 Jul 2026 22:25:26 +0200 (CEST)
Received: from frontend03.mail.m-online.net (unknown [192.168.6.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4grpKf29Lvz1r5hk;
 Thu,  2 Jul 2026 22:25:26 +0200 (CEST)
Received: from localhost (dynscan3.mnet-online.de [192.168.6.87])
 by mail.m-online.net (Postfix) with ESMTP id 4grpKf0x9Wz1qqlW;
 Thu,  2 Jul 2026 22:25:26 +0200 (CEST)
X-Virus-Scanned: amavis at mnet-online.de
Received: from mail.mnet-online.de ([192.168.6.182])
 by localhost (dynscan3.mail.m-online.net [192.168.6.87]) (amavis, port 10024)
 with ESMTP id ncjpk34cUJKo; Thu,  2 Jul 2026 22:25:25 +0200 (CEST)
X-Auth-Info: 7a/00HNMmgUfB3xHwmmhglhFU44m5NTRntGz6sVey4z6enX+NdD4pTSKzwbbA5hz
Received: from igel.home (aftr-62-216-202-104.dynamic.mnet-online.de
 [62.216.202.104])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Thu,  2 Jul 2026 22:25:25 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id BDAAC2C0AF1; Thu, 02 Jul 2026 22:25:24 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: Markus Triska <triska@HIDDEN>
Subject: Re: bug#81346: 32.0.50; `insert' sometimes does not insert text as
 expected
In-Reply-To: <20260702201506.939E1F08652@triska-ser8>
References: <20260702201506.939E1F08652@triska-ser8>
Date: Thu, 02 Jul 2026 22:25:24 +0200
Message-ID: <87v7ax16mj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 81346
Cc: 81346 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

On Jul 02 2026, Markus Triska wrote:

> In "emacs -Q", when I evaluate the following form:
>
>     (let ((d1 (propertize " " 'display "t"))
>           (d2 (propertize " " 'display "t"))
>           (d3 (propertize " " 'display "t")))
>       (insert d1 d2 d3))
>
> then "ttt" is inserted, as expected.
>
> In contrast, when I evaluate the following form:
>
>     (let ((d (propertize " " 'display "t")))
>       (insert d d d))
>
> then unexpectedly only a single "t" is inserted.

42.16.1 Display Specs That Replace The Text
-------------------------------------------

   For replacing display specifications, “the text that has the
property” means all the consecutive characters that have the same Lisp
object as their ‘display’ property; these characters are replaced as a
single unit.  If two characters have different Lisp objects as their
‘display’ properties (i.e., objects which are not ‘eq’), they are
handled separately.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81346; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Jul 2026 20:09:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 02 16:09:24 2026
Received: from localhost ([127.0.0.1]:44310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wfNir-0000qX-7k
	for submit <at> debbugs.gnu.org; Thu, 02 Jul 2026 16:09:23 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:43648)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mt@triska-ser8>) id 1wfNik-0000p4-Ma
 for submit <at> debbugs.gnu.org; Thu, 02 Jul 2026 16:09:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mt@triska-ser8>) id 1wfNiZ-00089P-Sg
 for bug-gnu-emacs@HIDDEN; Thu, 02 Jul 2026 16:09:04 -0400
Received: from [78.47.144.35] (helo=metalevel.at)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <mt@triska-ser8>) id 1wfNiV-0005PU-OP
 for bug-gnu-emacs@HIDDEN; Thu, 02 Jul 2026 16:09:03 -0400
Received: from triska-ser8 (localhost [127.0.0.1])
 by metalevel.at (Postfix) with ESMTP id 21E859C7B3
 for <bug-gnu-emacs@HIDDEN>; Thu,  2 Jul 2026 22:08:57 +0200 (CEST)
Received: by triska-ser8 (Postfix, from userid 1000)
 id 939E1F08652; Thu, 02 Jul 2026 22:15:06 +0200 (CEST)
From: Markus Triska <triska@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 32.0.50; `insert' sometimes does not insert text as expected
X-Debbugs-Cc: 
Message-Id: <20260702201506.939E1F08652@triska-ser8>
Date: Thu, 02 Jul 2026 22:15:06 +0200 (CEST)
X-Host-Lookup-Failed: Reverse DNS lookup failed for 78.47.144.35 (failed)
Received-SPF: none client-ip=78.47.144.35; envelope-from=mt@triska-ser8;
 helo=metalevel.at
X-Spam_score_int: -8
X-Spam_score: -0.9
X-Spam_bar: /
X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, RDNS_NONE=0.793, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

In "emacs -Q", when I evaluate the following form:

    (let ((d1 (propertize " " 'display "t"))
          (d2 (propertize " " 'display "t"))
          (d3 (propertize " " 'display "t")))
      (insert d1 d2 d3))

then "ttt" is inserted, as expected.

In contrast, when I evaluate the following form:

    (let ((d (propertize " " 'display "t")))
      (insert d d d))

then unexpectedly only a single "t" is inserted.

The expectation is that "ttt" is inserted.

Thank you and all the best,
Markus

In GNU Emacs 32.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw
 scroll bars) of 2026-07-02 built on beelink-ser8
Repository revision: 44bff5182d190fd3e42bf8f85039cc1d19e50acd
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: Debian GNU/Linux 13 (trixie)

Configured using:
 'configure --without-cairo --with-x-toolkit=lucid
 --with-xpm=ifavailable --with-gif=ifavailable --with-tiff=ifavailable
 --with-gnutls=ifavailable --with-native-compilation=no'

Configured features:
DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSYSTEMD
LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS
TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XFT XIM XINERAMA
XINPUT2 XPM XRANDR LUCID ZLIB




Acknowledgement sent to Markus Triska <triska@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#81346; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 3 Jul 2026 06:45:07 UTC

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