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: Thu, 30 Mar 2023 11:00:00 +0100 Message-ID: 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> <21d018e5-a730-12e3-f97c-fffa4f646ccf@yandex.ru> <83v8ioc2ou.fsf@gnu.org> <87sfdsx0r2.fsf@gmail.com> <87lejgsf0m.fsf@gmail.com> <83pm8s70o3.fsf@gnu.org> <83mt3u65vw.fsf@gnu.org> <87y1newqus.fsf@gmail.com> <6987b4f9-bb90-07cf-b64c-612574dff29e@yandex.ru> <87tty2wpt8.fsf@gmail.com> <4d8df485-adcb-64f3-742f-37c9a9a40f65@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="6400"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , dancol@dancol.org, casouri@gmail.com, emacs-devel@gnu.org, theo@thornhill.no To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 30 11:58:40 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 1php3H-0001Uj-Tj for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Mar 2023 11:58:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1php2w-00019U-63; Thu, 30 Mar 2023 05:58:18 -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 1php2r-00018k-Fc for emacs-devel@gnu.org; Thu, 30 Mar 2023 05:58:16 -0400 Original-Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1php2p-0006KV-Vd; Thu, 30 Mar 2023 05:58:13 -0400 Original-Received: by mail-ot1-x32b.google.com with SMTP id q23-20020a05683031b700b006a1370e214aso6838990ots.11; Thu, 30 Mar 2023 02:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680170289; 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=Aj9ynNi8d/36FheFxJscR+y3y9uR8BBXfJGcOF6dojI=; b=isCEJEn9IsKG15XOQQysVN1YCswrVWFjwAmjR4T5GRgxXz31UDqrBzZ/+gT3OPuM6Z fvaHEh+qlhS00BBTvWy6AF7eI9oWGPdpwvz7ynKEW28jptU6kNSvEySG4xHs3luYO8HF jlmxIzS2g7sFzCH39sA9U2TURJzRNC2YSY6bI1eN2m67g6SkgODAov7ewshaw9FUVk8i 3/C1paQZTYAE98SxI/iKZmEpLZvVsalPttcol3sShjli8AKG0X/ZVie1wWBe3I+MJhoO CmjWc9fSVY+NJyfUIk1i/qTvGdHQVNnT5/iWDKWTylupw1d3rUSt9vioUzdgRxhnuCdq CtUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680170289; 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=Aj9ynNi8d/36FheFxJscR+y3y9uR8BBXfJGcOF6dojI=; b=WBSA67XyQjb9iI0N2ZIVvHef5XXcEm+PGRDDEUPvazF00aNzXG7OP4YMrvfh/q54Tz BI6VPZVA7NGEsDrcb3TrDtfsPvPTOvvH7g9y87CgSpTKoSP/5MHLxMk+LQ3JWzU/G6BA odJhWMg+bdqi9FA8FhYlwRpCztMgq984X6FElENAYWeFc7ouUzeqyZ2lTVMuWO63kvUY rzGJk3J71jx4StElCVKiGJ7Ljevfqa4lKcjs/YJi2G90MQtmzHz1YBT7CnJdCQwWdvps +sZL0X7gm6pXmUZ6A241bu8lfDjzUGrlN8ARKrd48qRHguNL5KI7RnKKSJO6Q2Y+lCY2 wWbA== X-Gm-Message-State: AAQBX9cMd8hfequrt6m1IpVymNuxgOjItAMNijdeerFpVESeKWT8wtBo FIoUS31adwyJ9YTCm6d6ix5AH7nxbLfyL1w09X0= X-Google-Smtp-Source: AKy350Y1STpZhYtLYPM+Ot9tKtoWh3EabT8dKcR0rMvI1uNKkfKbEwn/ROoXomsPzRTyytkVQSfC5nWxR28qB+F0Ipg= X-Received: by 2002:a05:6830:30af:b0:69f:6663:508e with SMTP id g47-20020a05683030af00b0069f6663508emr2159494ots.1.1680170289543; Thu, 30 Mar 2023 02:58:09 -0700 (PDT) In-Reply-To: <4d8df485-adcb-64f3-742f-37c9a9a40f65@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::32b; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x32b.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:304851 Archived-At: On Thu, Mar 30, 2023 at 10:36=E2=80=AFAM Dmitry Gutov wr= ote: > > On 30/03/2023 12:28, Jo=C3=A3o T=C3=A1vora wrote: > > This problematic already counts as "bouncing" to me, for some meaning o= f > > "bouncing". c++-mode doesn't behave like that because indentation is > > already where it is supposed to be if you type that sequence of > > keystrokes. > > Okay, if that's what you meant. > > I think this one (indentation after RET in an incomplete function > definition) should be fixed in the indentation rules. The contents of > electric-indent-chars won't fix it either way. This is all down to indentation rules, that's how electric-indent-mode decides what to do. My point is that having electric-indent-chars be this ambitious with "broken" indentation rules isn't a good place to be. What counts as "broken" indentation is also arguable though. When dealing with invalid programs, there is really no "right" or "wrong" indentation. See my message https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62412#14 whe= re I show cases where c++-ts-mode's answer to indenting an invalid program makes more sense than c++-mode's answer. Whatever the indentation rules, the current bouncing is so jarring that it really doesn't encourage people to try switching to c++-ts-mode, get used to its set of indentation rules, and then perhaps experience its other benefits like, say, performance or simplicity. At least it didn't for me. I'm back to c++-mode atm. In my opinion electric-indent-char should be reduced to the default and should be added criteriously as the indentation rules they trigger are fixed. Jo=C3=A3o