From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62717: 29.0.60; c-ts-mode does not indent the first line in a function after RET Date: Fri, 07 Apr 2023 21:48:48 +0200 Message-ID: References: Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5562"; mail-complaints-to="usenet@ciao.gmane.io" To: 62717@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 07 21:50:34 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 1pks6T-0001IG-Py for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Apr 2023 21:50:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pks62-0002jp-Py; Fri, 07 Apr 2023 15:50:06 -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 1pks60-0002jJ-MI for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 15:50:05 -0400 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 1pks5y-00012v-Be for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 15:50:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pks5x-0005q8-OL for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 15:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Apr 2023 19:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62717 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168089694922377 (code B ref -1); Fri, 07 Apr 2023 19:50:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Apr 2023 19:49:09 +0000 Original-Received: from localhost ([127.0.0.1]:57269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pks57-0005or-FR for submit@debbugs.gnu.org; Fri, 07 Apr 2023 15:49:09 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pks56-0005ok-Dj for submit@debbugs.gnu.org; Fri, 07 Apr 2023 15:49:08 -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 1pks50-0002eP-Go for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 15:49:06 -0400 Original-Received: from sonic314-20.consmr.mail.ir2.yahoo.com ([77.238.177.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pks4y-0000NO-Fv for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 15:49:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1680896931; bh=xGTEMA7VWS0sS43zzOHkT7PiHA+DgFRU1BKRxCAeTTQ=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=ObAPYSMXu0CSkwVCElxQRHghnu3ZVs2cZ0focxpL/VWRNlY7mtqGD6qiYXNZjeBLitqQLuSETEIhCumAP8aOVPXySFM8NSjFUK5fLirR962a/U4gdvBgIvDQ0ZJe481yRNhYgD3EWK0LT7bR9lT4Sj+A955chLY7z0n7El2xD8+g2VulOsZZhITGXBv4J0Ay+1PObLQoxr8ZgwLHyAShiEgu6fzMWASQP8pDBOJ48rKAce2Di9niQYh+o4pBHIxOXiMjPjxXcN4ivx0wsIkbYOgCZgwfR4IWCLsQgzwT43WSuWGk6qK7EIeTx2xhB/USOJsEmsTf3b9WzdQZQdx9lw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680896931; bh=N7ePH33nDpY9OUQJvtoxwJex2bMHZ66m//xtmrv2rjx=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=T0hp0qIMib548AIyAOs+kJ0j+w53qcpMQLqNXv4eaB4Cfy53+hlsjDw897UEcQW6TZz3l9ad4t72OkcP55ojBeTCOME3+cIByDjH3lPTX/e/dvmfUNHp1veIMnhUiBJ+ZRdfKAmY5yqr1q1uXNOnkuKTRwM814pmCNOFB8H5Mvui+TD2DEuXnU6Fu7TDTjkP2kaRkMs6eHlGR/naXlrA9XGPjhy7otG7fiW4kVIIn/N1uDS0nmmX2P3HDLR+9XLEcwyl8vvWcNoBrPG+pM50ig317hE0HKzMnfY7hgWBM9ympvAuK86fd36hUUn4Ri2NJNb/0ZkwAE5Er8ljv5wndw== X-YMail-OSG: kuYqIoQVM1keVaJBDVxxN8jTedHsJAWr25lxTsy4LOwbEW0TazbvUezfw.EMhAn 7.yvXCwMkuoJhmrYrbyEoFVU47q0OkSV5pmWm3PDpqea.73OXS05gvLkSXY.dMrv7ZDb.vruLKIg sLPj15bkMWAr2DPS4.1UDn5P4Bsef_kl3ic9teEfquDBKce9AQgNxScrrsGLAtRipj_3eFElzh9P mbwC3YinwjuQFnC6pog0yRnK9xyGtIpCRO6SfmwLBudJ.wXDf1eqFzBf6t2yCDYOuE8qoV82DzLh tZR062t0PrvkJq0zNoqcuEssAHCtRmhIBYkcIKGbkyNNKmiL0rBNpVwDiv1CONjnQoNdoykyFUjt EDnRUKy_zZCVo7WTnbfLAIUwPgGudMVQ3MSAXKk5WjApiUn6i7WbrXWngsYrXsqGzAABmhYdqna9 tIXTwGhjnRxa.cfDNmoapa6T8h30..shIwqgewawd9LagHScX2xV2nY6puqun3X8Ujq1zaUF5Ejp kkxmy6h2vMG8jqR1Kv4ZX3niePcguXhNO0Ln57I6y54Mg13YJw2EKblfrPiDyCIMwLxMmWINuXo8 KMnVwlu__fOVIxenygZ8ytbK9Q.iSP1NhcgmE6HByXHh2BAufgaOWvvcU_dqHl5mi5OKaiCOgCqN gb_zCiak65RgVzGt.5gsh2Uzr6J3qebfZZyEBrEf6raZonm3ytvLqvhf32DJ3vS66r642lY9MDFm IpErn4MFXwyFgmBN7ZzEiKkp3aPbV._i6mvHcimD7Y_jdeMjX2qXn4DETtCpoAeRGZ2Amqu7h9Dz UwHi4kITCpFmI9T9M1mMgFyY0F2.5acBtla19s0BDY X-Sonic-MF: X-Sonic-ID: f60484cb-4e57-4504-abe7-1579bea876ed Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Fri, 7 Apr 2023 19:48:51 +0000 Original-Received: by hermes--production-ir2-74cd8fc864-d5c78 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID bbb88cabdb34bbf91d088bc7174f0a60; Fri, 07 Apr 2023 19:48:49 +0000 (UTC) X-Mailer: WebService/1.1.21365 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.177.146; envelope-from=mardani29@yahoo.es; helo=sonic314-20.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:259434 Archived-At: emacs -Q C-x b sample.c RET M-x c-ts-mode RET int main() { If I press RET at the end of the line, the point is not indented. The Tree-sitter tree for the code is (translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list ( ))) body: (compound_statement { }))) If I insert a closing bracket, that is: int main() { } The newline indents correctly. The Tree-sitter tree is now (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list ( ))) body: (compound_statement { })) It seems that Tree-sitter parses both code snippets without errors and Emacs should automatically indent after RET in the first case.