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.bugs Subject: bug#61502: 29.0.60; c-ts-mode auto-indent not working Date: Wed, 15 Feb 2023 19:30:48 +0200 Message-ID: <83y1oyal9z.fsf@gnu.org> References: <87v8k4g8xu.fsf@codeisgreat.org> <83a61ge69s.fsf@gnu.org> <87edqs11db.fsf@thornhill.no> <83a61gc8xx.fsf@gnu.org> <875yc40zhu.fsf@thornhill.no> <838rgzce0c.fsf@gnu.org> <873577qewk.fsf@thornhill.no> <83lekzauvz.fsf@gnu.org> <87ttzn2enc.fsf@thornhill.no> <83bklvatrj.fsf@gnu.org> <87r0ur6kv1.fsf@thornhill.no> <83a61fas5w.fsf@gnu.org> <6AAA6F2C-605C-4C90-9B3B-9223A9707A43@thornhill.no> <834jrmc0u9.fsf@gnu.org> <4D34D384-C36F-47F1-A1D7-DA4C85B53316@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61502@debbugs.gnu.org, casouri@gmail.com, pankaj@codeisgreat.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 18:32:48 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pSLeA-0006pE-RB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 18:32:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLdV-0007di-Eb; Wed, 15 Feb 2023 12:32:05 -0500 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 1pSLdT-0007cw-Au for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 12:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSLdS-00081I-H1 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 12:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSLdS-0002oH-2z for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 12:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61502 X-GNU-PR-Package: emacs Original-Received: via spool by 61502-submit@debbugs.gnu.org id=B61502.167648227910740 (code B ref 61502); Wed, 15 Feb 2023 17:32:02 +0000 Original-Received: (at 61502) by debbugs.gnu.org; 15 Feb 2023 17:31:19 +0000 Original-Received: from localhost ([127.0.0.1]:33837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSLcl-0002nA-Cl for submit@debbugs.gnu.org; Wed, 15 Feb 2023 12:31:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSLcg-0002mt-6l for 61502@debbugs.gnu.org; Wed, 15 Feb 2023 12:31:17 -0500 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 1pSLca-0007fr-0b; Wed, 15 Feb 2023 12:31:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1Fxkce2FIC2txfw7CJOxFDOp6TUHK5AgWRhjNV5iCJY=; b=TWl0RebE/xga PNMLjI9EOeVfAaalz1wlviBlCwk7+oMRgZT9mE2nmMZd4SDyDbJ1P5kk+/dZ7GqwHhQVOBc9CjnIs 4RFLGMbIebsgZnlbIT+OoQdft+ql1Xos7+4w0BEHou/aF4ImYw5B2hyP7kGZR+cwrq9BLU3xhG//G mfvdRym0mP2KVOYNC4a/C+HM4q0pkifLSa1dUu+yXGG0WPKttoyG1fFejXhj+/Jj36VXlWRHHemu7 yR4K2Ei3VHnX4ZYfewAMjWzvTtsPV9VRukuRpQp3yOtFGjJ9XCuR2xKDjD2C5cklXIPvdSUxv4PtC o7kIx0xsINLD8M0unqmEmQ==; 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 1pSLcZ-0003ti-G6; Wed, 15 Feb 2023 12:31:07 -0500 In-Reply-To: <4D34D384-C36F-47F1-A1D7-DA4C85B53316@thornhill.no> (message from Theodor Thornhill on Wed, 15 Feb 2023 18:14:46 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255748 Archived-At: > Date: Wed, 15 Feb 2023 18:14:46 +0100 > From: Theodor Thornhill > CC: pankaj@codeisgreat.org, casouri@gmail.com, 61502@debbugs.gnu.org > > >Look back for the first line that has something other than whitespace? > > Yeah, we could. But what then with > > for ( > ;;) > | > > ? > > Not saying it's impossible, but we will get complexity that may be hard to get into emacs-29, i think. At some point we will have to rely on electric characters to fix the indentation later. We just need to try to fix the more blatant and simple situations, I think, and punt (for now) where it becomes hairy. I wonder, though: what do other IDEs which use tree-sitter do in these cases?