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


Message #154 received at 70784 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Pip Cet <pipcet <at> protonmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 70784 <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#70784: Abolish string resizing
Date: Sun, 24 Aug 2025 11:11:09 +0200
5 aug. 2025 kl. 15.49 skrev Mattias Engdegård <mattias.engdegard <at> gmail.com>:

> Otherwise, not much to say really. Everything works but that's a given; don't expect anything to break at this point.

Now on master.

By the way, here's some fun if you like coding puzzles:

(let ((s (copy-sequence "∀x∈A")))
  (aref s 3)
  (fillarray s ?§)
  (aref s 3))

See if you can figure out what happens without running it.

Naturally, that can be fixed very easily but the point here still stands: `fillarray` with a multibyte character is almost impossible to use in practice. And, no surprise, it seems impossible to find any such use of it in existing elisp code anywhere.

Most uses of `fillarray` on strings is for overwriting passwords and the like and that's fine, although `clear-string` is a better choice. It shouldn't cause anyone problem whatsoever if we make `fillarray` obey the `aset` rules; it would actually make it easier to use. Patch coming.





This bug report was last modified 13 days ago.

Previous Next


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