GNU bug report logs -
#5033
23.1; antlr-mode: antlr-indent-command broken for long grammars
Previous Next
Reported by: Mr Kludge <mrkludge <at> gmail.com>
Date: Tue, 24 Nov 2009 15:05:04 UTC
Severity: normal
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5033 in the body.
You can then email your comments to 5033 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#5033
; Package
emacs
.
(Tue, 24 Nov 2009 15:05:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mr Kludge <mrkludge <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 24 Nov 2009 15:05:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I am running into an antlr-mode bug when indenting long grammars.
Specifically, when the point in the grammar is higher than
antlr-slow-cache-diff-threshold indenting a grammar rule fails in
calling c-where-wrt-brace-construct through beginning-of-defun.
To trigger:
Write a longinsh grammar (more than 5k chars with the default setting)
or simply set antlr-slow-cache-diff-threshold to 0 and then try to
indent in a grammar rule.
See attached silly.g for an example.
Indentation breaks, with the following error:
c-where-wrt-brace-construct: c-beginning-of-decl-1 returned label
Backtrace:
c-where-wrt-brace-construct()
c-beginning-of-defun(1)
funcall(c-beginning-of-defun 1)
beginning-of-defun-raw(nil)
ad-Orig-beginning-of-defun(nil)
beginning-of-defun()
antlr-syntactic-context()
antlr-indent-line()
antlr-indent-command(nil)
call-interactively(antlr-indent-command nil nil)
Solution:
A simple solution (kludge) is to modify antlr-syntactic-context to not call
beginning-of-defun in antlr-mode.el.
See attached patch.
[Message part 2 (text/html, inline)]
[antlr-mode.el.patch (application/octet-stream, attachment)]
[silly.g (application/octet-stream, attachment)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5033
; Package
emacs
.
(Fri, 01 Jan 2010 17:43:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 5033 <at> debbugs.gnu.org (full text, mbox):
> I am running into an antlr-mode bug when indenting long grammars.
> Specifically, when the point in the grammar is higher than
> antlr-slow-cache-diff-threshold indenting a grammar rule fails in
> calling c-where-wrt-brace-construct through beginning-of-defun.
> Solution:
> A simple solution (kludge) is to modify antlr-syntactic-context to not
> call beginning-of-defun in antlr-mode.el. See attached patch.
I am not able to test this solution, because I don't work with antlr
files (and I doubt any of the other core Emacs maintainers do either).
I'm CC'ing the author of antlr-mode, Christoph Wedler, though we haven't
heard from him in a while.
In the meantime, could you try to explain what removing the
beginning-of-defun call in antlr-syntactic-context might break? (Surely
that call is there for a reason.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5033
; Package
emacs
.
(Mon, 28 Mar 2016 02:36:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 5033 <at> debbugs.gnu.org (full text, mbox):
I cannot reproduce this on Emacs 25. I loaded the provided silly.g, set
the antrl-slow-cache-diff-threshold to 0, and indented each line without
any issues, at many different points on the line.
Someone can let me know if they can still reproduce this, otherwise I'll
close this out.
Chong Yidong <cyd <at> stupidchicken.com> writes:
>> I am running into an antlr-mode bug when indenting long grammars.
>> Specifically, when the point in the grammar is higher than
>> antlr-slow-cache-diff-threshold indenting a grammar rule fails in
>> calling c-where-wrt-brace-construct through beginning-of-defun.
>
>> Solution:
>> A simple solution (kludge) is to modify antlr-syntactic-context to not
>> call beginning-of-defun in antlr-mode.el. See attached patch.
>
> I am not able to test this solution, because I don't work with antlr
> files (and I doubt any of the other core Emacs maintainers do either).
> I'm CC'ing the author of antlr-mode, Christoph Wedler, though we haven't
> heard from him in a while.
>
> In the meantime, could you try to explain what removing the
> beginning-of-defun call in antlr-syntactic-context might break? (Surely
> that call is there for a reason.)
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Tue, 01 Oct 2019 01:18:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mr Kludge <mrkludge <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 01 Oct 2019 01:18:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 5033-done <at> debbugs.gnu.org (full text, mbox):
Andrew Hyatt <ahyatt <at> gmail.com> writes:
> I cannot reproduce this on Emacs 25. I loaded the provided silly.g, set
> the antrl-slow-cache-diff-threshold to 0, and indented each line without
> any issues, at many different points on the line.
>
> Someone can let me know if they can still reproduce this, otherwise I'll
> close this out.
It was never closed at the time, 3 years ago, so I'm closing this now.
If anyone can still reproduce this, please reopen the bug report.
Best regards,
Stefan Kangas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 29 Oct 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.