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:09:18 +0200 Message-ID: <834jrmc0u9.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31771"; 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:10:17 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 1pSLIO-00081l-LP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 18:10:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSLIC-0006TN-C9; Wed, 15 Feb 2023 12:10:04 -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 1pSLIA-0006TC-Fk for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 12:10:02 -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 1pSLIA-0000oI-3n for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 12:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSLI9-0002FF-Kj for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 12:10:01 -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:10:01 +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.16764809858596 (code B ref 61502); Wed, 15 Feb 2023 17:10:01 +0000 Original-Received: (at 61502) by debbugs.gnu.org; 15 Feb 2023 17:09:45 +0000 Original-Received: from localhost ([127.0.0.1]:33820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSLHt-0002Ea-1j for submit@debbugs.gnu.org; Wed, 15 Feb 2023 12:09:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSLHr-0002EJ-6i for 61502@debbugs.gnu.org; Wed, 15 Feb 2023 12:09:43 -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 1pSLHl-0007bT-Kt; Wed, 15 Feb 2023 12:09:37 -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=3M3Mh2tZnGpZvBm0Ocylz3sUa+utufxRzPu9XrfKSGE=; b=hPJK+waGQeFO vaP7856H1o1vOMJsoekMVY8InVz5Dv4/xRniHnjqWqOCufWrK/QyjQESKW5GyQxXj69FFSoEepeao 3Db7fa9pgkKbIPpgfKfUEBJcEhOcXVJuqe7ib0RVb7gUKEPKIUsTjTnvBnjTDc2uGveseqf2LBIT9 17v4YPlt/uf8nVr4n5v0S+naSbRWkaifd1W3KP1tcWEsFRczuRalj83iwsd/nVNCjtdOS/336na7l J9ZUzgyjxTtVEmVOapEtwWiuu0NWR2wnZDMG0Fkvo/C7n6fRrM+W+FcUc5XHJZWjwvjAz/T6Rw7jj +zZRpjGRVgisICEu1yNYHw==; 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 1pSLHl-0005HJ-2C; Wed, 15 Feb 2023 12:09:37 -0500 In-Reply-To: <6AAA6F2C-605C-4C90-9B3B-9223A9707A43@thornhill.no> (message from Theodor Thornhill on Wed, 15 Feb 2023 16:48:33 +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:255745 Archived-At: > Date: Wed, 15 Feb 2023 16:48:33 +0100 > From: Theodor Thornhill > CC: pankaj@codeisgreat.org, casouri@gmail.com, 61502@debbugs.gnu.org > > > > On 15 February 2023 16:02:03 CET, Eli Zaretskii wrote: > >> 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? > > Yeah, but what then to do when there is only whitespace? Look back for the first line that has something other than whitespace?