From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: treesit indentation "blinking" Date: Mon, 3 Apr 2023 11:28:28 +0100 Message-ID: References: <83bkka5z7w.fsf@gnu.org> <871ql6a4d4.fsf@gmail.com> <83jzyy4776.fsf@gnu.org> <9F152CAA-6326-459F-84FF-87988B3A92B6@gmail.com> <6bf0322b-1151-129a-e26f-61cf4f232d17@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40440"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , Yuan Fu , Eli Zaretskii , theodor thornhill , geza.herman@gmail.com, Daniel Colascione , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 03 12:29:32 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 1pjHRL-000ANA-P8 for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Apr 2023 12:29:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjHQd-0000II-Ri; Mon, 03 Apr 2023 06:28:48 -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 1pjHQY-0000CC-Bj for emacs-devel@gnu.org; Mon, 03 Apr 2023 06:28:43 -0400 Original-Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjHQW-0005Nh-SE; Mon, 03 Apr 2023 06:28:42 -0400 Original-Received: by mail-oi1-x232.google.com with SMTP id bj20so21326471oib.3; Mon, 03 Apr 2023 03:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680517719; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rQ9elyLvfHzpnlywNwJdv3UbAXKOfY+cZ9TQzQHdEC8=; b=J3JNQI62Hw8g1LZH5HK/c+mlu7hy8uXn3tJP7ZO41ws633RCOCZdCtZ1MqAmIrAdXh 42lqbd/TjOk/fp/5qzK28TWQ2ac9pFW9yM1Id4PrwCXHieb857ISR8sNRXch2pPB0cwX vWN9QQp8SulxzvuDn6k4IKRUopFKP65dtqNQuVPrNL/6Ds9tnuthR5cJBBwMejlPtCph eYoqDd9tluAQloXMKF7YmG1vFsabClxYuAyQXKGKPl98DLyrAbBsW9GHA3b346Jm2TS+ /kgNZbm+UaPaGmC3zbM7Qtf7WdZkDN/XguXaeoW8QN5+TIVDo8OHnhkY7mYuZUXs7W98 +lJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680517719; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rQ9elyLvfHzpnlywNwJdv3UbAXKOfY+cZ9TQzQHdEC8=; b=aFpYoaKSM1q13U29Vky/0diAy7q7i4WwBc7K1xSbcscCV3ySg9Uy0j7ad+fkG2iki7 STKObXNH9bcQ45gwySkAqVhmb1L+m5vpEXWM0bkdBRwEA1zzKPkpTCwkjhOW0P0Uimvn kJIyHsbC7u27RjppuFo28aLGarf3hZ1nl1kWaE55CtSg+I011TwWprH2tcot4teODj5m 2q1puqT/Bfpcvikbjj9XG5+9z0LGyBttlFQ+8oIE7j1CvE/rqb2GPfCTRI2nmxc7yxrH kCKW8AUfDVuDMEP2BqR8QIoJV6+dlYPY5V2tGaV2FEGO5GxW2YXntxEUqXuQYG5PZtYM I7cQ== X-Gm-Message-State: AAQBX9eUarRK0MZPa78DMwhU86956gWeKk65zqvcBPf00F8nHnZEtkl3 PB45ByRs28dQQFrGFYXqutdFTcJ0yfleCLhb40Q= X-Google-Smtp-Source: AKy350ZG/vnncBVFr2Seoe24qZr7QCTOXkaxAyN2I/UPg7+ZP5ocaoBOaPWCCNHUUf76aKXm+Urlv87/jzAsrXGeD3I= X-Received: by 2002:a05:6808:14d3:b0:384:420d:6671 with SMTP id f19-20020a05680814d300b00384420d6671mr6241093oiw.5.1680517719342; Mon, 03 Apr 2023 03:28:39 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x232.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:305065 Archived-At: On Mon, Apr 3, 2023 at 10:59=E2=80=AFAM Alan Mackenzie wrote: > > Hello, Dmitry. > > On Mon, Apr 03, 2023 at 00:21:18 +0300, Dmitry Gutov wrote: > > On 02/04/2023 20:23, Jo=C3=A3o T=C3=A1vora wrote: > > > So my initial idea was to tone down electric-indent-chars, at least > > > for the moment. And Dmitry's idea was to make electric-indent-chars > > > be ambitious_only_ if electric-pair-mode is enabled (by the user). > > > Maybe we should bring back that idea, and it seems the least bad of t= he > > > bunch right now. > > > Alternatively, we only perform "electric indent" (aside from after RET) > > when the parse tree does not contain errors. > > That is NOT electric indentation. The whole point about electric > indentation is for it to take effect whilst point is still on the line > being edited. I can't speak for Dmitry, but I think that's precisely what is in mind here. Say I have this buffer and point is on the end of the second line: int foo() { something() } As soon as I type the ';' at the end of "something", the parse tree is valid and electric-indent kicks in. In this buffer: int foo() { for() something(); } Then "blinking" would not happen if you add two ;; inside the for's parens, as it does now, because as soon as soon as I add one, the parse tree becomes invalid (presumably) and electric-indent does not kick in. Jo=C3=A3o