From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#66845: 29.1; cmake-ts-mode indentation broken Date: Tue, 31 Oct 2023 15:50:43 +0000 Message-ID: References: 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="13826"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66845@debbugs.gnu.org To: Juan Palacios Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 31 16:51:54 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 1qxr22-0003MS-DB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Oct 2023 16:51:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxr1e-0004w0-NT; Tue, 31 Oct 2023 11:51:30 -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 1qxr1c-0004qP-PC for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 11:51:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxr1c-0006A6-Fo for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 11:51:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qxr29-0002de-Oy for bug-gnu-emacs@gnu.org; Tue, 31 Oct 2023 11:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Oct 2023 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66845 X-GNU-PR-Package: emacs Original-Received: via spool by 66845-submit@debbugs.gnu.org id=B66845.169876749710105 (code B ref 66845); Tue, 31 Oct 2023 15:52:01 +0000 Original-Received: (at 66845) by debbugs.gnu.org; 31 Oct 2023 15:51:37 +0000 Original-Received: from localhost ([127.0.0.1]:49022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxr1k-0002cu-O8 for submit@debbugs.gnu.org; Tue, 31 Oct 2023 11:51:37 -0400 Original-Received: from mail-4022.proton.ch ([185.70.40.22]:25257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxr1h-0002cb-7v for 66845@debbugs.gnu.org; Tue, 31 Oct 2023 11:51:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail; t=1698767452; x=1699026652; bh=9tGaEP2kMUDJuVlLsZcMwB6tQLu/LqKLmOL0EtdOq+M=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Rrhh0hiKQiKygdSWeETgESMC1nlIG7ah3GVRmnBM16UE6iDvPzCJwW7t3/diXgw9k UjBr//kZwTaI0WddrdreSRoROY8sN45IbVHj/Hv2nkYxKZ0EEcEZnoPUG02lZ9Tj1o e9jXyvLBr5OOQQU0neIkQjZzpCNCJDavPlxkIRHsIa15SwlOOP4YQmJdhPuYsEVMeD e+UarVJuUPBg3B14+hNGTiYzbBbBsR2t4Vj9sWPWiM+LabQgNy8rj/iFiB/oLNIZ7g sOObfxU3/+6gW8B0r8vaOnCRePKJjl2bUyyCN7EBahVrU1hlFIdJCDGXbCF1XDjI3P KqEz1VXrxUKeA== In-Reply-To: Feedback-ID: 44397038:user:proton 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:273566 Archived-At: On Tuesday, October 31st, 2023 at 07:35, Juan Palacios wrote: > Using cmake grammar from https://github.com/uyha/tree-sitter-cmake >=20 > Reproduction: > 1. emacs -q > 2. C-x C-f test.cmake > 3. M-x cmake-ts-mode > 4. Insert the following text: > if(TRUE) > message("indent") > endif() > 5. Move the point to the beginning of the second line. > 6. TAB > 7. Notice that no indentation is performed. >=20 > treesit-simple-indent-rules local value: > ((cmake > ((node-is ")") > parent-bol 0) > ((node-is "else_command") > parent-bol 0) > ((node-is "elseif_command") > parent-bol 0) > ((node-is "endforeach_command") > parent-bol 0) > ((node-is "endfunction_command") > parent-bol 0) > ((node-is "endif_command") > parent-bol 0) > ((parent-is "foreach_loop") > parent-bol cmake-ts-mode-indent-offset) > ((parent-is "function_def") > parent-bol cmake-ts-mode-indent-offset) > ((parent-is "if_condition") > parent-bol cmake-ts-mode-indent-offset) > ((parent-is "normal_command") > parent-bol cmake-ts-mode-indent-offset))) >=20 > treesit-explore-mode shows: > (if_condition > (if_command (if) ( > (argument_list > (argument (unquoted_argument))) > )) > (body > (normal_command (identifier) ( > (argument_list > (argument > (quoted_argument " (quoted_element) "))) > ))) > (endif_command (endif) ( ))) >=20 Thanks for the report, I'll take a look tonight.