GNU bug report logs - #73778
30.0.91; cpp-ts-mode indentation never finishes

Previous Next

Package: emacs;

Reported by: Augustin Chéneau (BTuin) <btuin <at> mailo.com>

Date: Sat, 12 Oct 2024 20:05:01 UTC

Severity: normal

Found in version 30.0.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 73778-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augustin Chéneau (BTuin) <btuin <at> mailo.com>
Cc: 73778-done <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#73778: 30.0.91; cpp-ts-mode indentation never finishes
Date: Sat, 19 Oct 2024 14:10:50 +0300
> Date: Sat, 19 Oct 2024 12:58:36 +0200
> Cc: 73778 <at> debbugs.gnu.org, Yuan Fu <casouri <at> gmail.com>
> From: Augustin Chéneau (BTuin) <btuin <at> mailo.com>
> 
> 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" <bug-gnu-emacs <at> gnu.org>
> >>
> >> In c++-ts-mode, there is a bug when I indent a line with <tab>.
> >>
> >> This is trivially reproducible with the below code:
> >>
> >> int func() {
> >> 	int a;
> >> 	int b;
> >>       }
> >>
> >> Place your point before "int b;", press <tab>, 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.




This bug report was last modified 274 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.