From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode Date: Tue, 9 Jul 2019 08:33:15 -0400 Message-ID: <9d579361-cc1e-d2c0-e4f2-a0e62dba32f2@gmail.com> 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: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94068"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 Cc: emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 09 14:34:12 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 1hkpJx-000OIo-Jw for ged-emacs-devel@m.gmane.org; Tue, 09 Jul 2019 14:34:09 +0200 Original-Received: from localhost ([::1]:49610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkpJu-0003D4-R1 for ged-emacs-devel@m.gmane.org; Tue, 09 Jul 2019 08:34:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59613) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkpJD-0002oP-9G for emacs-devel@gnu.org; Tue, 09 Jul 2019 08:33:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkpJB-0004jq-Di for emacs-devel@gnu.org; Tue, 09 Jul 2019 08:33:23 -0400 Original-Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:42590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkpJ9-0004hQ-EB for emacs-devel@gnu.org; Tue, 09 Jul 2019 08:33:21 -0400 Original-Received: by mail-qt1-x841.google.com with SMTP id h18so13979426qtm.9 for ; Tue, 09 Jul 2019 05:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=r7b/jCfrz6PG0Oee+6JHrMIBrj+m2EcNW6dUjY9b1a4=; b=X8TfvPGDcJeBZTZHrfM5//8MI8xUIpQm3YPk6TWegzSwzIzAvV+3LaMnE3ZJzcJi8n T5X7lYUP/ql/BzxpNsM4kK4o4XSp54rG/buzfA34NKShdbzJilbJB+yc3wcXHd6SQ3rV wFJuEJnTePzNKyDs6mtsBV4QpiIU1WYp/CP/UAxM6Pq5ELzKmF9vtE3BM+5cDtRY0EN8 bGjIJ2QIKT5/naHblta+DGEYTsWEtG//ESHj2JY8wn9y4Fdu483QVb3CZtWZO5FTZhnE 3pLw0vDU9fLB16a3UBQ1+2TcC4uh0zLL0AZyQellOfU9ryDy3/QaKgTVOkz0dtAmzukb cQFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r7b/jCfrz6PG0Oee+6JHrMIBrj+m2EcNW6dUjY9b1a4=; b=avAMkaY0XHT2q8idKHzJXvzoEKaibwKvpAv/iuP+XwVQAbG/fYnqEWDXPNuBD09Dzs 1el25sSDhHFBgfvuwdLFeq60B8x84EPNeeHR7LQwGVZLF3JyhACIGOH+Iib/IrZrk1gz Vx31M+XXzML3NquFlcVamQ7NWDX84OmeN+IQ8A5dTjeSJlfhVEgNUgip/LSahfTZAXMK Yzv8GrmFSgacVg2lNJ2BggFkMmy6/Iv5Qef4gvqD1cXfuP/3y9qENbLMYmGVv5mgHqdu KeQUms7DDPZfjKsquISPlHJQYPccotmR5JI8kBPEyid4f4yBDQjdm240gixV6/gAbCP4 WJrA== X-Gm-Message-State: APjAAAVpwEqRqyaaT6tWPhNv466kezmd/3Y9NySi88qYhRRcEDzphDpL X3yAr7YoI4fazFF+VpXQn2CYwdl5 X-Google-Smtp-Source: APXvYqzMQkPV/oYenKPmaQjznBSlT0tRQauvVdveDS/1wC7qnhzcCcC7Qt27PlSOCNOjVpnfF5quUA== X-Received: by 2002:ac8:2225:: with SMTP id o34mr18445476qto.222.1562675597224; Tue, 09 Jul 2019 05:33:17 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:f900:e23e:b2e9:4b78? ([2601:184:4180:66e7:f900:e23e:b2e9:4b78]) by smtp.googlemail.com with ESMTPSA id r5sm9244587qkc.42.2019.07.09.05.33.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2019 05:33:16 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::841 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:238439 Archived-At: On 2019-07-09 05:06, João Távora wrote: > On Tue, Jul 9, 2019 at 7:42 AM Clément 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. Huh? I'm claiming that: * Single line string are a pretty common case * Fontifying to the end of the line and not past it minimizes refontification in that case Is that controversial? > 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. Yes, of course. Did I say something else? > Both situations are wrong, and neither is "more wrong" than the other. I'm glad we agree. That's why I wrote 'That's not more "correct", of course' > But the version you propose is much harder to implement, likely less > efficient, Strong words :) Are you saying refontifying the whole screen after the point is faster than just refontifying to the end of the line? > Depending on how it is implemented (certainly how Alan > implemented it) it breaks things in Emacs core and third-party code. But surely the quality of Alan's implementation has little impact on the worthiness of the feature in general (I'm not arguing about how things should be in cc-mode today — just saying that I like the general idea) > It is also > useless in languages which do allow unescaped multi-line strings And more strong words :) I'm saying it's an option I'd like to have while conceding it's not universally better, so it surely wouldn't be useless to me ^^ Do we know what behavior is standard in other IDEs, and whether it is configurable? On my machine I have vim, geany, gedit, and vscode, and all of the behave like Emacs currently does (but they refontify immediately, without a jit-lock idle delay).