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 00:25:29 +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> <87lejfkv6d.fsf@gmail.com> 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="5384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , dgutov@yandex.ru, dancol@dancol.org, casouri@gmail.com, theo@thornhill.no, emacs-devel@gnu.org To: =?UTF-8?Q?Herman=2C_G=C3=A9za?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 30 01:24:03 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 1phf99-0001HX-E6 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Mar 2023 01:24:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phf8o-00049n-Hf; Wed, 29 Mar 2023 19:23:42 -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 1phf8m-00049f-Rm for emacs-devel@gnu.org; Wed, 29 Mar 2023 19:23:40 -0400 Original-Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phf8l-0000BI-4y; Wed, 29 Mar 2023 19:23:40 -0400 Original-Received: by mail-oi1-x22b.google.com with SMTP id y184so12911917oiy.8; Wed, 29 Mar 2023 16:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680132217; 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=Ap+KoLdhpXvk8zbNIYC53TbNBbUcKkielKzmLgZsaQs=; b=Co+qhcBez405Nd0VDg8gG0L+sVlZgWca19m+IR2+WqxAbrpQhjtjngkHiAw6rjrzvV 50KE2JINLEHgj68gpiaFvA/tHGmsUMax8MUNoBrhvP05qqFHPSX09jWaNrsTlbkuG+ig nB0nuzbEGzI+ga2qktCchCJV2NKW3O/uJ2xHi2mgjHZ++TTEFCjYod9K5lE4CejDO5Eh lXYUCq27fC2C9JsH29W0yEUflePduC8h1MgUa8KY3eTULksEOOEcs3A6M0tPiZFeA4dZ aglIaZtQEsgISoWQxscYhPDVfLBS6ytNbTjGK1M5Ns7gqGUlBP4wL8iMUOCw1QRQ2SH2 xRZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680132217; 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=Ap+KoLdhpXvk8zbNIYC53TbNBbUcKkielKzmLgZsaQs=; b=myR+n2eRikKMy3ThI1PCkmz33WOinqkvuY2c7ACNSYiJ/pB8IlDnYR+xbsoXzip53t Dnpv5gKbh1MDiuOKGOou9vZiFmoqdJau7F8oy0uoJe2qLM+YvID0OLkv+yg+LFthR8ro 6LvDixLIEhu81yjNs84w/6AKy/PyIew8h7NIZm3C3rXoatVHZ9VHilYojTmv0gOAxy96 zUcOVjvL1H7QPhzyWFXg+aDYMcS68RHsgAO+0mOjOBA6UHaEjE2dldUWHdtyzyAOwHlI kkLHAEo3GQKewF08T5l92k0ZaokRrj14MKTnHtUbXpZFRilTNsvLRspqYXG2pvZSSxKS yZvQ== X-Gm-Message-State: AAQBX9clDGryCSAs/2PRt0wnO71JPyarpD+lepbDYnK7aDlW+VjyrNmv wN1RwnkHvKEtyaZ+VFLNkBsFuKj7xzDCwxR5Les= X-Google-Smtp-Source: AKy350aNQ8P4ApS4am540WIGqAA6sHd+34ASPW9s4XouP6+Xmy12FEkRdcYSzLSa6AuwQHs+AICOhwuT7l8qFZsqkfo= X-Received: by 2002:a05:6808:14d3:b0:384:420d:6671 with SMTP id f19-20020a05680814d300b00384420d6671mr1466778oiw.5.1680132217505; Wed, 29 Mar 2023 16:23:37 -0700 (PDT) In-Reply-To: <87lejfkv6d.fsf@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x22b.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:304831 Archived-At: On Thu, Mar 30, 2023 at 12:13=E2=80=AFAM Herman, G=C3=A9za wrote: > > > Jo=C3=A3o T=C3=A1vora writes: > > > And then my personal opinion is that it is an annoying > > feature to have on by default as it whole lines about. > > Having electric-indent-chars set to '(?\n), like c++-mode > > has, is fine. > While c++-mode has only ?\n in electric-indent-chars, it does electric > indentation by other means. For example, ":" is bound to c-electric-colon= , > which behaves the same as you described c++-ts-mode previously: the > "std" keeps dancing around as you put one and then two colons after it. > > In my opinion, this issue has two different parts: > > 1. design problem which cannot be really solved. Like this "std::" > thing. The editor cannot read the programmer's mind (whether they will > put a second colon or not). And because c++-mode behaves the same, I > don't really think this is a bug. Or at least it is just a small one. If we're going to use c++-mode as a reference, then, without electric-pair-mode you get another class of "bigger" bugs. Just type emacs -Q thingy.cpp -f c++-ts-mode int main () { RET for (;;) {printf("infloop"); RET } it still bounces around. c++-mode doesn't. Sure, you may say "oh that's because the c++-ts-mode indenting is off". OK, then I say "when/if it's ever fixed, then we can add these extra electric-indent-chars". Jo=C3=A3o