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 17:02:03 +0200 Message-ID: <83a61fas5w.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7615"; 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 16:03: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 1pSJK0-0001jD-6M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 16:03:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSJJM-0000OF-7v; Wed, 15 Feb 2023 10:03:08 -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 1pSJJJ-0000NC-PW for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:03:06 -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 1pSJJG-0004u5-GP for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:03:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSJJG-0006fV-1j for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 10:03: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 15:03: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.167647335325597 (code B ref 61502); Wed, 15 Feb 2023 15:03:02 +0000 Original-Received: (at 61502) by debbugs.gnu.org; 15 Feb 2023 15:02:33 +0000 Original-Received: from localhost ([127.0.0.1]:33578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSJIm-0006en-Vq for submit@debbugs.gnu.org; Wed, 15 Feb 2023 10:02:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSJIj-0006ea-PI for 61502@debbugs.gnu.org; Wed, 15 Feb 2023 10:02:32 -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 1pSJId-0004nP-Ch; Wed, 15 Feb 2023 10:02:23 -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=9ka6R96AjqJk9SwshKn4SXv3qWJKEB78TLhOkoXeUFI=; b=JQxlufTI3hN3 xc4wnL6yA0k2uP/ah50p/xB5MLm2DafMQGL08Z3rn+TgkpXza1hqiBMJnl7tKherHGks6sWxyHLmP CjoS2CCx3ta/gk1Ooy9tm7G+a8R9rloHgDBdMMy4w0sOZ6Xl7Yexx768vJPutAg42K6UfSrF3FgDH VomnktFR1QkufeD8uO4O+KD3PaSo6+8YtIqwutmGW/Af0UeuSMVHe0RQOOP4uPvbrj1lL5P2Bzm9w CGOME62mOD4TVQR8IJ75gm7yea/r5IZxnihchk2N0Ki51nb8qbojAlEv7fnDA26QAe4d73tJjMM3e UD3S9vBL7z839UH2zps6MQ==; 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 1pSJIc-0007qF-QQ; Wed, 15 Feb 2023 10:02:23 -0500 In-Reply-To: <87r0ur6kv1.fsf@thornhill.no> (message from Theodor Thornhill on Wed, 15 Feb 2023 15:53:22 +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:255729 Archived-At: > From: Theodor Thornhill > Cc: pankaj@codeisgreat.org, casouri@gmail.com, 61502@debbugs.gnu.org > Date: Wed, 15 Feb 2023 15:53:22 +0100 > > >> int > >> main > >> { > >> for (;;) > >> | > >> > >> eval: (treesit-node-at (point)) ;; # > > > > I'm afraid I cannot interpret that. What does it mean? > > It returns the closing paren in "for (;;)", right before point. Which > may not be as useful, as it is a child of for_statement, IIRC. Making a > rule for that isn't too hard, but it complicates things. Hmm... this might make no sense, but: why are we asking about the node at point? For indentation purposes, when RET is pressed, shouldn't we ask about the node of the first non-whitespace character of the line where we get RET?