From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode Date: Tue, 9 Jul 2019 10:06:14 +0100 Message-ID: References: <20190703105804.GA11238@ACM> <20190704165846.GF5564@ACM> <20190704190100.GG5564@ACM> <20190708100539.GD4529@ACM> <20190708164501.GB5244@ACM> <20190708180551.GD5244@ACM> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001ba2aa058d3be049" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="48086"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 09 11:07:10 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkm5d-000COu-Ra for ged-emacs-devel@m.gmane.org; Tue, 09 Jul 2019 11:07:09 +0200 Original-Received: from localhost ([::1]:47998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkm5c-0002P1-P1 for ged-emacs-devel@m.gmane.org; Tue, 09 Jul 2019 05:07:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40460) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkm5A-0002Ou-Bp for emacs-devel@gnu.org; Tue, 09 Jul 2019 05:06:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkm52-0007p8-A9 for emacs-devel@gnu.org; Tue, 09 Jul 2019 05:06:35 -0400 Original-Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]:44909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkm4y-0007jl-7m for emacs-devel@gnu.org; Tue, 09 Jul 2019 05:06:30 -0400 Original-Received: by mail-io1-xd43.google.com with SMTP id s7so41527183iob.11 for ; Tue, 09 Jul 2019 02:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3Kron/w47CwvJTQ4FEIgRL7G0cuzcEkWky3cwh/qT+4=; b=KGm3fXsDI3zZ4HT+5EorvOLZN7ej8yzJXefiHn8Ob8cjujpDdjZPkFA3EFcYJES3oY FIaZo8seWVMS9MYdUFiAqrum0UtFMKdR10oimXra4axthPLfKTyu8JNLNS3CJsets2MC 57eZ/L1sJX48zXiuWoJ+XvqAONYFdqfE4n6k8uH6cuAVf2o3xgO24MCg0GFOOkG0jzJJ bgm/2kPi30+/1zPYklMgP+653LzH1oaO4bPmd1gCkN7jajn24tewzuTqOFQWDD2Tei6I BmfX19x+jfxsQxc8w+yybGQ3TZqfhVYdz8C4wJyq4AgwciUSWlu6b32Bgswj3zDCQ9ud z0vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3Kron/w47CwvJTQ4FEIgRL7G0cuzcEkWky3cwh/qT+4=; b=YkmfmjQVj6b/jcEFdq4viA+kuP45pjWmncQ5PchHCYfxu+gore3lxBtN0A/o+20tCH xlnXXjQcZ3M8Ppuizc6lmdDsD13SJpXG4Aia8Q4Uiy4erko+Bacpedb7sLqocCGDDEMt Y0ovzIhLJLO39/ZFh790I6Oct9uYwROmk1XGIbHnlTrIQhrELdrjTEKtmXgKbLIuiLmP K+xXkUevnqb8rqNR72iR4ZbuEvB0DF+NRF10JWqWxMeG80kql5GbbwCcwblq7wb5gtBA ynkUwfOMCsWDsprminu47VcWvwSPli0Snf5qOVEfRYnuG9JEC6kiSuzrHAb1ZOD0opN6 mnHw== X-Gm-Message-State: APjAAAXe9y1PCR2T0JlMW/2iHczIHZhK35TO8Q/NG7M+5dryHn7R6tra 3LMymrlUrEUaCVqH+x0pXbP0nnB0V+Xk3xHKxn8= X-Google-Smtp-Source: APXvYqzsc1tdz8v2+JwzaQV5LB3sIpWtVivsbksTIT9biF3PSiT9RmZQdYf+dwE74AWegsZSnnOHcnjz8rc2Pq8l0r4= X-Received: by 2002:a6b:dd18:: with SMTP id f24mr3561334ioc.97.1562663186045; Tue, 09 Jul 2019 02:06:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d43 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238432 Archived-At: --0000000000001ba2aa058d3be049 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 9, 2019 at 7:42 AM Cl=C3=A9ment Pit-Claudel wrote: > > of the line. That's not more "correct", of course, but it does minimize the amount > of refontification and blinking in a pretty common case. No, it doesn't. Suppose you had that hypothetical version of Emacs and you did have a multi-line string, properly escaped with backslashes. Now you removed the backslash. Brutal "wrong" refontification ensues just as now, fontifying as code what up to now used to be fontified as a string. Just as distracting, really. Both situations are wrong, and neither is "more wrong" than the other. But the version you propose is much harder to implement, likely less efficient, and backward incompatible to how Emacs has worked over many, many years. Depending on how it is implemented (certainly how Alan implemented it) it breaks things in Emacs core and third-party code. It is also useless in languages which do allow unescaped multi-line strings (which I think are the norm nowadays, but I'm not sure). Overall, clearly not a net win. Jo=C3=A3o --0000000000001ba2aa058d3be049 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jul 9, 2019 at 7:42 AM Cl=C3=A9ment Pit-Claudel &l= t;cpitclaudel@gmail.com> wr= ote:
>
> of the line.=C2=A0 That's not more "corr= ect", of course, but it does minimize the amount
> o= f refontification and blinking in a pretty common case.

No, it doesn't. Suppose you had that hypothetical version of Emac= s and
you did have a multi-line string, properly escaped wit= h backslashes. Now you
removed the backslash. Brutal "w= rong" refontification ensues just as now,
fontifying as code= what up to now used to be fontified as a string.

= Just as distracting, really.

Both situations a= re wrong, and neither is "more wrong" than the other.
<= div>But the version you propose is much harder to implement, likely less
efficient, and backward incompatible to how Emacs has worked o= ver
many, many years. Depending on how it is implemented (ce= rtainly how Alan
implemented it) it breaks things in Emacs c= ore and third-party code. It is also
useless in languages wh= ich do allow unescaped multi-line strings (which
I think are= the norm nowadays, but I'm not sure).

Overall= , clearly not a net win.

Jo=C3=A3o




--0000000000001ba2aa058d3be049--