bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55205: 28.1.50; completion--replace illegally mutates completion can


From: Eli Zaretskii
Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates
Date: Mon, 02 May 2022 19:43:48 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: larsi@gnus.org,  mail@daniel-mendler.de,  55205@debbugs.gnu.org
> Date: Mon, 02 May 2022 12:34:28 -0400
> 
> > 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.

I have no doubt that in most cases there's no modification of the
original strings.  However, AFAIU the discussion was about not letting
that happen, ever, and that I cannot understand.

IOW, I'm saying that people who want to see all the strings immutable,
all the time, have wrong expectations _in_principle_, even though in
most cases they will probably get what they want.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]