From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates Date: Mon, 02 May 2022 12:34:28 -0400 Message-ID: References: <4d1b8687-20f2-137a-2739-7bba28828991@daniel-mendler.de> <87wnf5mpt4.fsf@gnus.org> <835ymp78hl.fsf@gnu.org> <834k276gyd.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10983"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: mail@daniel-mendler.de, larsi@gnus.org, 55205@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 02 18:35:15 2022 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 1nlZ11-0002bx-BP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 18:35:15 +0200 Original-Received: from localhost ([::1]:44644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlZ10-0002F6-7H for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 12:35:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlZ0r-0002E7-7z for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 12:35:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlZ0q-0002bm-Ti for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 12:35:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlZ0q-0008R6-Qh for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 12:35:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2022 16:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55205 X-GNU-PR-Package: emacs Original-Received: via spool by 55205-submit@debbugs.gnu.org id=B55205.165150927832328 (code B ref 55205); Mon, 02 May 2022 16:35:04 +0000 Original-Received: (at 55205) by debbugs.gnu.org; 2 May 2022 16:34:38 +0000 Original-Received: from localhost ([127.0.0.1]:37827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlZ0P-0008PH-Sh for submit@debbugs.gnu.org; Mon, 02 May 2022 12:34:38 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:29119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlZ0P-0008P2-4d for 55205@debbugs.gnu.org; Mon, 02 May 2022 12:34:37 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4C59310028F; Mon, 2 May 2022 12:34:31 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 078B0100121; Mon, 2 May 2022 12:34:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651509270; bh=9L30ZDWR8g5lNBcmIj15kxTaDsEGdpgYak6Xn1XycOE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=HQcI3Miq/RGXdvW2UjX/5j7uOTgMyEsvqVXTmFvhSuqm4SjkCvk88mt9UjPNgql3V 6CrkOl5a7+ppgMqlrpkiyjbE1ido8Cf8vNpxeNThwEJfFKu0KcaZ8V2fZCmOqEtSCw O4TQCLnhEkERNamMPT3hTYLdA1JNAt7R5SHrcyB/exJzLP+qcKEbsPAeADb4kxZ6lc LXis9pTd13IJGm5Sxoyaw8Adu3YadFt+FNydPh42qKtgm8RJ+z6jQQdtGwIJVjPQHq 2M4I5UzXRRU5R1wqpiADKxR268vz+g+lVdZm6H9OvrazXcrI6B3FNLLYBHOgJb160v NV6Oesqde186w== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B73921203E4; Mon, 2 May 2022 12:34:29 -0400 (EDT) In-Reply-To: <834k276gyd.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 02 May 2022 19:24:10 +0300") 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" Xref: news.gmane.io gmane.emacs.bugs:231268 Archived-At: > I have no idea. The way you present this is waaay above my level of > understanding. > > Completion takes text typed by the user and produces strings that the > user could possibly mean by typing what he/she typed. Some part(s) of > the candidates can legitimately come from what the user typed, some > other part(s) could be invented by the completion machinery more or > less out of thin air. Why should anyone expect this meat-grinder to > refrain from destructively modifying any of the involved strings? Because the overwhelming majority of strings are never modified. It's very unusual to modify a string by side effect (as opposed to creating a new string object via `concat`, `substring`, ...). This is true in most languages, AFAICT, but it's definitely true in ELisp. Stefan