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

Indentation for large code blocks #5

Closed
yuyichao opened this issue Mar 31, 2016 · 6 comments · Fixed by #98
Closed

Indentation for large code blocks #5

yuyichao opened this issue Mar 31, 2016 · 6 comments · Fixed by #98

Comments

@yuyichao
Copy link
Contributor

There's currently a limit of lines/statement per code blocks that can be indented correctly. It is a pretty large limit but can be seen when indenting a large function (e.g. some in inference.jl).

Reproduce with

function f()
    g = begin
        function ()
            return begin
                1
            end
        end
    end
    # repeat the `g =` block above ~150 times.
end

Ref JuliaLang/julia#9831 (the original issue of arguments/list is already fixed)

RalphAS added a commit to RalphAS/julia-emacs that referenced this issue Oct 18, 2016
User-friendly remedy for JuliaEditorSupport/julia-emacs/issues/JuliaEditorSupport#5
@StephenVavasis
Copy link

I'd just like to ping on this issue. It's been open for a long. Fixing this would improve my workflow.

@StephenVavasis
Copy link

I think this issue should be closed. Here is the solution (emacs 24.3.1, with Julia-mode loaded) that was posted on discourse:

M-X customize-variable
(prompt from emacs: customize-variable:) julia-max-block-lookback
(new buffer opens, shows previous value 5000 of this variable)
Type 20000 in the blank next to the variable name.
Click "Apply and Save"
(emacs shows in command line that .emacs file has been rewritten)
C-X C-K to kill this buffer.

@tpapp
Copy link
Collaborator

tpapp commented Mar 30, 2018

I think it would be reasonable to have a large value (eg 20000) as the default. It does no harm on a modern computer.

@galenlynch
Copy link

I concur that the default should be increased.

@aramirezreyes
Copy link

Me too.

@torfjelde
Copy link

I think it would be reasonable to have a large value (eg 20000) as the default. It does no harm on a modern computer.

Adding my voice to crowd.

Ran into this issue myself in the case of a laaaarge testset (slightly above 20 000 chars), and just tried increasing julia-max-block-loop to more than this, and the slowdown was not even noticable on a not-the-most-modern CPU. So I agree; increasing default is good idea:)

Personally, I also thinks it's better to have issues like "This is super-slow, why is it slow?" rather than "This completely breaks!"

tpapp added a commit that referenced this issue Dec 25, 2019
@tpapp tpapp closed this as completed in #98 Dec 25, 2019
tpapp added a commit that referenced this issue Dec 25, 2019
Increase lookback.

Fixes #5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants