From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70784: Abolish string resizing Date: Tue, 07 May 2024 21:41:10 +0800 Message-ID: <874jb94u4p.fsf@yahoo.com> References: <86v83rb2bl.fsf@gnu.org> <87ttjb3yzy.fsf@yahoo.com> <868r0lc1t1.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3403"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: mattias.engdegard@gmail.com, 70784@debbugs.gnu.org, monnier@iro.umontreal.ca, drew.adams@oracle.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 15:43:08 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4L63-0000eU-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 15:43:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4L5e-0005sl-DG; Tue, 07 May 2024 09:42:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4L5a-0005oU-GQ for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 09:42:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4L5Z-0001sd-K8 for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 09:42:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4L5y-0007hT-Cw for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 09:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2024 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70784 X-GNU-PR-Package: emacs Original-Received: via spool by 70784-submit@debbugs.gnu.org id=B70784.171508933629528 (code B ref 70784); Tue, 07 May 2024 13:43:02 +0000 Original-Received: (at 70784) by debbugs.gnu.org; 7 May 2024 13:42:16 +0000 Original-Received: from localhost ([127.0.0.1]:42763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4L5D-0007g8-Gj for submit@debbugs.gnu.org; Tue, 07 May 2024 09:42:15 -0400 Original-Received: from sonic314-20.consmr.mail.ne1.yahoo.com ([66.163.189.146]:40705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4L59-0007fg-U3 for 70784@debbugs.gnu.org; Tue, 07 May 2024 09:42:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1715089300; bh=mSLD89EvbG3IuHhQz8a7Q+4Y76Oc7XQsIXBioAJNy54=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=q8bc+UFbJSkUiHe/4FiBJH61eh5Th/aCX5tyVKvQxLEeSF3HRVCKWAbzGdNRbrRUD4yoUu6BmMV9CLTFh0t9JWpoc9RD3yfo8H0Ns1ktHgQMWVcCimLupyp41uv5DG+LSAcNkQ9wjhkaXPSV6wQnuzELe3tgPcMXnmTF2p7eYvbyYyi9jZ5P9TNPSkYCE+arqn+umwzU0f0/JmE0lICnOk2h4kYewDi7Cn45v7b453qHj3/n2lxHzf4uSUNFqOSQqVe41THbACx6A7kiRoZTyxyXenNKqlRMWlEjPu8cF6+21e/2KdIB77GTOvX7ifyJio/eCpza3c1LVxIakoieew== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1715089300; bh=A82EFYuyeirev1Q7cBOWD15szgXyemszXIX2xptojGQ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=FyNKcTGxu2ZygYzBw2hkHW2bR/6otL4lYbTjHFu4HeSqb9aVVpUlBXODXKANUy+60TRW+jeHEVVPkVnhTBKsHlr70fT5cyV3lWqPa7KadD4Lr3vybMppc6rtqXeeF22qJXsq5KSOhkivTY5UNHCSNPkRB/ypTOvlsIubUu/m+WKa1eZ6VWW1UdBswhos6yYwYvERmpWm8tc105io215hoOFyK0kEcaTOLolAsw9sgN+eO5dlLXAvMOMEAzCAsLVhwF2Rw5l47DW0EEmtK+EZhImyvXqTXF+ZMMnpNjvdlp6tupZw1oH4KqlTQZcTyjtlFZ8jxPJYXvxmDo1WvibqtA== X-YMail-OSG: dADXNicVM1mRA0UzQtwCZ9UvZdH9x_Egx.bW5b9mLEsryJFllqSCRWd8yJ9TKAO 8iHclO_Syx6fqoJlyZZbQN5B3GoXvBIscb2jPtoN5GNmpZqySkSY.i3xoSGgBIiz.oAim9L23Yx7 1XspNITLsQmViZeAzPo12YY6B_W4HBfTKVD60GMeaNyOVU0LSXsWck_XlTCaQbUJM9PhGhscMc_m bh_jz8RR7e5cqzUdegL8YCOP290EpqeeP0Txwm1vRGnpRcSBu49bZTGfo20tlfNwf5ZQPRxTCBp9 oiu3b1zs7ZtTzeBlwVMRWXOtkikoM48ndr_aU8ns6t90TBbf7t6dj1GhbGgvGtIevEPwnnZVa_mf M0m7SWA80mruaHPdn6Xi3er4v2uGIqdIyJ.f2xqic9S9487rmMAZkH9EspXgZjnrljDp9DXDpDUN ST01BYc7tCn_VAxSwJY3rtltNpq3alBXd75qognsgQTnC_M6gY7AK4tKygYFD5rgQvXFn0_ugVa5 mHuKbUBDyc90jSzBFX_XHQldz.wPuH6dcd36ufnMjykWZOpuREIQ0DKU0P75sXgrYsxn.lL7k9CO T0RUIqbp7lE3czgWqMG_aaA_qsOy7EytouZr1fV5eWUmhVJMWGoULfih2ekP5eqp2RENVNmfATep iPdk04rUJerssJOr_dzAhC083m5KIue.DzJRdXxy252huR7bomJ2taECOSLnvWaF0BTkklwbbXGI 7o50Sgx6DbmL7Qw4vDZPMFhtfc37G0VtVE1ul5lw9.DU6McZ00HGyG7TuNaJlp7BfRS_dvu4bZNb a3m6XP3lxclMWiunx56nFrSzw3ir08VlFpEVYQbTm7 X-Sonic-MF: X-Sonic-ID: 6e677726-e70a-4447-9158-b088ec0cbfa6 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Tue, 7 May 2024 13:41:40 +0000 Original-Received: by hermes--production-sg3-6f9f87bd85-kvpdh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1b13498a2c1ec346860027acd3cc933e; Tue, 07 May 2024 13:41:37 +0000 (UTC) In-Reply-To: <868r0lc1t1.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 May 2024 14:13:30 +0300") X-Mailer: WebService/1.1.22256 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284640 Archived-At: Eli Zaretskii writes: > What _would_ matter is if there are important use cases out there > where replacing one character by another character of a different > multibyte length. So if you, or anyone else, can come up with such > situations (which are not made up specifically to argue here), please > do, because knowing about such situations would be useful to make this > discussion serious and based on facts. There is certainly plenty of Emacs code that needs to replace characters within strings whose contents are more or less arbitrary, so that whether Mattias's proposal will disrupt them will vary in an unpredictable manner from one string to the next. I would venture to suggest that _every_ invocation of aset with multibyte strings will potentially be disrupted by the proposal in its mildest form, and it will only be a matter of time before problems surface. A wildly variable length of time, for that matter, so it is infeasible to anticipate their impact ahead of time, at least with the accuracy that such a change deserves. Nevertheless, examples are legion and one need search no further than one's own init files for them: (progn [...] (if allow_unicode (progn (aset string pac-quote-start ?=E2=80=9C) (aset string (1- pac-quote-close) ?=E2=80=9D) ) (progn ;; Sometimes [...] prints unicode quotation marks ;; surrounding pac captions so prevent inserting them into ;; source code comments. (aset string pac-quote-start ?\") (aset string (1- pac-quote-close) ?\") ) ) [...] ) string is process output from shell-command-to-string, generated by a Perl script I cannot publish. Please don't ask for details as to the script itself, since I am not at liberty to disclose them, and they have absolutely no bearing on the matter at hand.