From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Herman=2C_G=C3=A9za?= Newsgroups: gmane.emacs.devel Subject: Re: treesit indentation "blinking" Date: Thu, 30 Mar 2023 00:37:48 +0200 Message-ID: <87lejfkv6d.fsf@gmail.com> 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> 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="39368"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.0; emacs 30.0.50 Cc: Eli Zaretskii , dgutov@yandex.ru, dancol@dancol.org, casouri@gmail.com, theo@thornhill.no, emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 30 01:15:02 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 1phf0P-000A5c-O8 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Mar 2023 01:15:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phezL-0002nU-4Y; Wed, 29 Mar 2023 19:13:55 -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 1phezJ-0002nC-Nb for emacs-devel@gnu.org; Wed, 29 Mar 2023 19:13:53 -0400 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phezH-0006sf-E1; Wed, 29 Mar 2023 19:13:52 -0400 Original-Received: by mail-wr1-x436.google.com with SMTP id q19so14230795wrc.5; Wed, 29 Mar 2023 16:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680131629; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=k8AANc1fYKpzEAXAmkOVFp7+KHU36BNLB64JGjvKDx4=; b=EXsH2s1ba7V6BpxEEq5+EAxuuXA1pb1U1o11DcyUblpD4Jdew6dWej+1kfMG3LqABF XpMwOf6JVK5NUaF7sMO68nr/J8110RSOjFYTj9iOPvaHuGLlaVzJjyzjTkXY0qv8SauQ lAxPE204lvdPpOtGfkeseTdP5ZB/LF6cMkrMhF0ZDecyzsZSgBC2ELTyvdatnzFuL3zC 4tcQO7EIxzeYs1Xlx6ugsAsfXusR8+kiZLZvD7URx0pu3F5j22cgKla2jH8gXqsngmk1 drpHJtMAIxOu6USSgt+AQfcz87/LLmAE9p5MJWLSHmQUybxFdtKbH/HC/hchZ1TL5L+v gmSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680131629; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=k8AANc1fYKpzEAXAmkOVFp7+KHU36BNLB64JGjvKDx4=; b=dQaj78g5xAPJNhnpj82m4laRmW3ZQyIt5Qieq3XvkW8DpEGkmQuuvZU4AhwGWHCLhE O8BlhXXurMkbYjFu0QkKYkR8skjrqbPHgv7nHX11zGUIvbZuZuzmyaWLf6RwML9gZ2g1 D/lwOiq72zKTuTR3pVFKrHkdtVOt7bZ0E00jaUUat9tIE8THhSbDxbsoDu+ffVw7d8cO +2yAtRlBooib2YLiQGSr7lKNwBpG5qli9yjYJZEwaMMJogi8GVxxwC0xBVan88kBeQ76 ZSSkDbtWuYbJ21moWG+wQUrlhSVLzAXp05MEwXQjNxRnsUOrLVoCTC8PUO7UFbIV3Psw YKvA== X-Gm-Message-State: AAQBX9fDe/j+fNw5mzw6NNBJOWL09jESC5qugE8vZfhv3iZrwafLwvLH znQBjRFAPQ5kwbsRhzp3UFc= X-Google-Smtp-Source: AKy350axB2qi7Yxig5XsF+jVPEiFkI6N7qMYylWCUhggcXRpJm13bj6ir3FRb6R6pRldRs1UTWIn8Q== X-Received: by 2002:adf:f288:0:b0:2db:11f3:f7ee with SMTP id k8-20020adff288000000b002db11f3f7eemr17539564wro.63.1680131628570; Wed, 29 Mar 2023 16:13:48 -0700 (PDT) Original-Received: from localhost (netacc-gpn-204-88-167.pool.yettel.hu. [5.204.88.167]) by smtp.gmail.com with ESMTPSA id c8-20020adfe708000000b002cde626cd96sm31121710wrm.65.2023.03.29.16.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 16:13:48 -0700 (PDT) In-reply-to: Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=geza.herman@gmail.com; helo=mail-wr1-x436.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:304830 Archived-At: 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. 2. tree-sitter related problem, where tree-sitter has the wrong idea of the correct indentation of a line. c++-ts-mode fails for one of the most simple thing: write "int foo() {" into an empty c++-ts-mode buffer, and press RET. You'll notice that the cursor won't be indented. Also, TAB doesn't work either. You need to manually press multiple spaces to have indentation. c++-mode doesn't have this problem. Note, I understand that calling this "ts has the wrong idea of correct indentation" may be unfair, but for a user the correct indentation is pretty clear in this situation. In my opinion this is a bug (that's why I reported #62412). G=C3=A9za