From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Wed, 09 Jun 2021 22:04:09 +0300 Message-ID: <83mtrydfme.fsf@gnu.org> References: <83lf7mhl3n.fsf@gnu.org> <73ff18bf-66dc-7d7a-a0db-8edc2cdceba8@gmx.at> <83o8cge4lg.fsf@gnu.org> <62e438b5-d27f-1d3c-69c6-11fe29a76d74@dancol.org> <83fsxsdxhu.fsf@gnu.org> <83pmwudgw3.fsf@gnu.org> <179f21d7780.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22922"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org, monnier@iro.umontreal.ca, rms@gnu.org, rudalics@gmx.at To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 09 21:06:07 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lr3Wh-0005nG-KP for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Jun 2021 21:06:07 +0200 Original-Received: from localhost ([::1]:58772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lr3Wb-0004cJ-MU for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Jun 2021 15:06:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lr3VH-0003Y1-4R for emacs-devel@gnu.org; Wed, 09 Jun 2021 15:04:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51980) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lr3VE-0004n4-KF; Wed, 09 Jun 2021 15:04:36 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4484 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lr3V8-0001UH-5T; Wed, 09 Jun 2021 15:04:30 -0400 In-Reply-To: <179f21d7780.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> (message from Daniel Colascione on Wed, 09 Jun 2021 11:51:28 -0700) 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270607 Archived-At: > From: Daniel Colascione > CC: , , , > Date: Wed, 09 Jun 2021 11:51:28 -0700 > > > That's why we had (and still have) font-lock-maximum-decoration: so > > that users could control the tradeoff. Unfortunately, support for > > that variable is all but absent nowadays, because of the widespread > > mistaken assumption that font-lock is fast enough in all modes. > > It should be fast enough for all modes. This isn't 1985. Computers in > general are *several orders* of magnitude faster than needed to do real > time syntax highlighting in general. I'm all for speeding it up, but the fact is, it isn't always fast enough, especially in large files/buffers. As long as it isn't fast enough, that variable has its place, IMO. > Other editors don't seem to struggle. Do you happen to know why? Maybe we could use some of the ideas. > Tree sitter is very fast. But we don't use it. I hope we will some day. > If regular editing is stuttering because of > fontification, we have bad data structures, algorithms, or architectures > --- that is, bugs. And we shouldn't add user options to paper over bugs. I disagree. These aren't "normal" bugs, these are design bugs, or maybe even limitations of the methods we use for fontifications. Such issues sometimes take time to replace with better ones, and in the meantime we need to provide reasonably responsive editing. > That's ridiculous. I can't believe we really want to propose a "please make > syntax highlighting wrong" user option. Not "wrong", just "less granular". There's no single "right" here.