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#73778: 30.0.91; cpp-ts-mode indentation never finishes Date: Sat, 19 Oct 2024 14:10:50 +0300 Message-ID: <864j58l551.fsf@gnu.org> References: <39d9021d-a4e8-4460-a113-0744f184e9dc@mailo.com> <86ttd8lde4.fsf@gnu.org> <5cc18bd9-601d-4db7-ae1a-0bdd08c47d96@mailo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29791"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73778-done@debbugs.gnu.org, casouri@gmail.com To: Augustin =?UTF-8?Q?Ch=C3=A9neau?= (BTuin) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 13:11:56 2024 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 1t27NE-0007cG-Dl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 13:11:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t27My-0003lV-6H; Sat, 19 Oct 2024 07:11:40 -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 1t27Mw-0003lD-SM for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 07:11:38 -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 1t27Mw-0007UM-K5 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 07:11:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=jFdZPJCXcxoqUweRLVACngU/eO6/jxmMErPpjoyhjkM=; b=OHwHDWp+01MQ79b1d1WRJv3mnlPG1qF/95/o0tEmPt+grtQzwAC6f5Yq2r/0+Vqck4f82pHvf4PSTNGQX0q1AsMSV3qDz16KSQku9H9PYg4WyiIP5gt2NDo6e2h9ycpFXvr5KhK+41f8kNryp0sc30Olt/v8NXtp8amSZRUOvh/ItUIFy4o/ysL1pOtqc+C8duilRmtVp1fpW1g+3h99hWMFDTyu+pGZGiE4KvAw1/8Mf/bDTpe8Vu7IgLdIhJMZdP+g0dXUBvnxrg1fj1AjRNv5n6Zknr2Q3M3kmeo9ovxyaCHSYev76jSCvwKeRREhw+ZL0/hWehA0W4WDf8RIPA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t27NJ-0001wN-Vw for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 07:12:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 11:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 73778 X-GNU-PR-Package: emacs Mail-Followup-To: 73778@debbugs.gnu.org, eliz@gnu.org, btuin@mailo.com Original-Received: via spool by 73778-done@debbugs.gnu.org id=D73778.17293362857403 (code D ref 73778); Sat, 19 Oct 2024 11:12:01 +0000 Original-Received: (at 73778-done) by debbugs.gnu.org; 19 Oct 2024 11:11:25 +0000 Original-Received: from localhost ([127.0.0.1]:41657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t27Mi-0001vL-St for submit@debbugs.gnu.org; Sat, 19 Oct 2024 07:11:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t27Mg-0001v5-Nr for 73778-done@debbugs.gnu.org; Sat, 19 Oct 2024 07:11:23 -0400 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 1t27MD-0007TU-LG; Sat, 19 Oct 2024 07:10:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jFdZPJCXcxoqUweRLVACngU/eO6/jxmMErPpjoyhjkM=; b=K2lnnYMYJeJO/J/U04Ux l+a+BvQgWDc+KEa2kn4o5JVpmHsWpJY+mrqfvfjmPSWIRIS93e31+p9k8+pRXlzyNfg5U6f2VrMYx D2GVe6/DaQzPnqShWl7SLY1n+dhakEa6i8r8ppMMal3q7z2W/hpWVxSmK7a2Po8If5C48lCvg738U L8epIwfEYqPddvlGNcvf53AZGmJO6PNvO8OO5piVQ8ZE3s6upNTLO41RElJ5a60M2mWe4Pkl5iX46 q+QxGWp7qwlHSganQmpmiq/wL+1OHc/jGztz/hAYRJhZegSXbhZ+Taik8nhY54W+8K68QJ8GU2Eq2 eQLDZPUDC3VJwA==; In-Reply-To: <5cc18bd9-601d-4db7-ae1a-0bdd08c47d96@mailo.com> (message from Augustin =?UTF-8?Q?Ch=C3=A9neau?= (BTuin) on Sat, 19 Oct 2024 12:58:36 +0200) 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:293873 Archived-At: > Date: Sat, 19 Oct 2024 12:58:36 +0200 > Cc: 73778@debbugs.gnu.org, Yuan Fu > From: Augustin Chéneau (BTuin) > > Le 19/10/2024 à 10:12, Eli Zaretskii a écrit : > >> Date: Sat, 12 Oct 2024 21:20:47 +0200 > >> From: Augustin Chéneau (BTuin) via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> In c++-ts-mode, there is a bug when I indent a line with . > >> > >> This is trivially reproducible with the below code: > >> > >> int func() { > >> int a; > >> int b; > >> } > >> > >> Place your point before "int b;", press , and the indentation > >> process never finishes. > >> > >> This is caused by an error in c-ts-mode--anchor-prev-sibling, as the > >> condition of the last "or" in the function has incorrect > >> delimitation. Which means that the "if" will run the second test on > >> success, which then cause the function to be stuck in an infinite loop. > >> > >> I would gladly send you a patch, but I've been stuck in the legal limbo > >> of the copyright assignment for months now and I cannot contribute to > >> GNU Emacs (or any GNU project for the matter). > >> > >> I hope my description will be enough. > > > > I cannot reproduce this on the latest emacs-30 branch, perhaps because > > changes were installed in the function you mention two days after you > > have built your Emacs. Can you try the latest emacs-30 branch and see > > if the problem still persists? > > > > Thanks. > > It seems it was indeed solved by commit > c154047c46ae833a114e84d72e62269d12c3249d, thanks! > > I don't know how to close this bug report, though. Thanks, I closed it.