GNU bug report logs - #70784
Abolish string resizing

Previous Next

Package: emacs;

Reported by: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>

Date: Sun, 5 May 2024 12:35:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70784 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#70784: Abolish string resizing
Date: Sun, 5 May 2024 16:18:16 +0200
5 maj 2024 kl. 16.04 skrev Eli Zaretskii <eliz <at> gnu.org>:

> How many places in our own sources call aset on strings?

In general, very little. Resizing ones, probably none now.

> I'm not yet sure this is a good idea, but one thing I'm sure: it is
> not for Emacs 30.  So if we decide to go this way, let's delay
> merging the changes until after the emacs-30 branch is cut, which
> should happen in a week or two.

That's fine, but a warning might help in emacs-30 to prepare for making resizing an error in emacs-31.
Here's how that would work: the first 5 times (say), emit a warning like

 Warning: `aset' on a multibyte string with char value #x2022 will become an error in Emacs 31

followed by a truncated stack trace, just enough to help the user (or someone helping out) see what package is responsible.






This bug report was last modified 141 days ago.

Previous Next


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