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: treesit indentation "blinking" Date: Fri, 24 Mar 2023 14:39:14 +0300 Message-ID: <83cz4ye5ul.fsf@gnu.org> References: <87h6ucik61.fsf@dancol.org> <0F406D08-56D4-4B21-B94D-A47681606911@gmail.com> <1870bcadd28.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <1870cce6690.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <35A837A9-59B4-4F1F-A5FA-8483C8024D76@gmail.com> <187104f6b48.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 24 16:42:18 2023 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 1pfjYX-00063F-LO for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Mar 2023 16:42:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfflR-0007UE-OV; Fri, 24 Mar 2023 07:39:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfflM-0007Tl-Rs for emacs-devel@gnu.org; Fri, 24 Mar 2023 07:39:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfflL-0005FB-4a; Fri, 24 Mar 2023 07:39:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=FSiF0mv08L6nKJPIZCxqq+2Fne2I029HsdGQF7aoWZw=; b=hRSJPrwbwDiS/ukQ3NOw uRnupzzr63yRO/coi4peTXAYH2YcZ9B7I8pFrYBP/eHI22BCUeBeV25WkIpm7jc2Hj4K6DOfAhC2c aS3dEtGNoNLfDk7+yPF4orUhSDkI2OJ1zGzUJ4r7wPJGDxxNpyq45MNDi7hPn+Ni+A7x95DzqIrnt aBB65mtM+akJgI6exXhrwKKIA/qjYiTz6wmc0DoFQPZss9Dtngf/59PI7iyqytIl3tY4/R/FGfpuR 4Sme7OppGQ0wUsNjWBlEvLq1E6KNZIMaHlQFkzUqZK6dIAANj25QFwQfmeF6cpIYrCnh0/f0BzGfl 2f81YC09W/Ra6w==; Original-Received: from [87.69.77.57] (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 1pfflE-00007K-Q0; Fri, 24 Mar 2023 07:39:14 -0400 In-Reply-To: <187104f6b48.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> (message from Daniel Colascione on Thu, 23 Mar 2023 17:10:53 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304749 Archived-At: > From: Daniel Colascione > CC: > Date: Thu, 23 Mar 2023 17:10:53 -0400 > > We can place this special rule at the end of our rule list, and previous rules not matching should > indicated “error” by itself. Of course, I can’t prove it by using this method to fix the blinking indent, but I > don’t quite have the time for it right now. > > Editing can cause all sorts of transient nonsense in the AST, and it's impossible to predict in a general > manner what this nonsense might be. The wrong kind of bracket can cause the entire rest of the file to be > parsed as nonsense. This or that error recovery rule isn't going to solve the problem: such a strategy is a > fragile whack a mole. There needs to be some general solution to prevent indentation blinking. This blinking > makes TS modules unusable for me. Daniel, could you please post a recipe, starting from "emacs -Q", to reproduce the "blinking" during editing you described up-thread? Preferably while editing some code that one can meet reasonably frequently in practice. I'd like to play with the example and see how serious the problem is. TIA.