Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

erlang-shell for Emacs gives "Unbalanced parenthesis" error #8569

Open
aathn opened this issue Jun 13, 2024 · 1 comment
Open

erlang-shell for Emacs gives "Unbalanced parenthesis" error #8569

aathn opened this issue Jun 13, 2024 · 1 comment
Assignees
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS

Comments

@aathn
Copy link
Contributor

aathn commented Jun 13, 2024

Describe the bug
Pressing tab in the erlang-shell for Emacs directly after startup produces an "Unbalanced parenthesis" error.

To Reproduce
Start Emacs, run M-x erlang-shell, press tab (or run indent-for-tab-command).

Expected behavior
No error should pop up. Nothing in particular should happen, provided erlang-tab-always-indent is t.

Affected versions
I tried this with OTP 27 and the accompanying erlang-mode, on Emacs 29.1.

Additional context
This bug is caused by the code for erlang-calculate-indent, which calls erlang-beginning-of-clause to move to the beginning of the previous clause in order to calculate the appropriate indentation. If erlang-shell was just started, this causes the point to move before the beginning of the first prompt, to the Eshell version string (Eshell V15.0 (press Ctrl+G to abort, type help(). for help)). Then, erlang-partial-parse is invoked, which results in a parse error giving rise to the message.

@aathn aathn added the bug Issue is reported as a bug label Jun 13, 2024
@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Jun 17, 2024
@dgud
Copy link
Contributor

dgud commented Jun 25, 2024

A PR solving this would be welcome :-)

@IngelaAndin IngelaAndin added the stalled waiting for input by the Erlang/OTP team label Jul 11, 2024
@IngelaAndin IngelaAndin added help wanted Issue not worked on by OTP; help wanted from the community and removed stalled waiting for input by the Erlang/OTP team labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

4 participants