# Emacs users should know about julia-max-block-lookback

**URL:** https://discourse.julialang.org/t/emacs-users-should-know-about-julia-max-block-lookback/10068
**Category:** General Usage
**Tags:** editors, emacs
**Created:** [March 30, 2018, 4:40am UTC](https://discourse.julialang.org/t/emacs-users-should-know-about-julia-max-block-lookback/10068 "2018-03-30T04:40:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)
#### Post date: [March 30, 2018, 4:40am UTC](https://discourse.julialang.org/t/emacs-users-should-know-about-julia-max-block-lookback/10068/1 "2018-03-30T04:40:37Z")

</div>

yeah- don’t use 5000. that’s too small a number.  
10000 is better.  
mystery of why my indentation was failing in the middle of a file solved.

in emacs’ julia mode

```julia
(defcustom julia-max-block-lookback 5000
  "When indenting, don't look back more than this
many characters to see if there are unclosed blocks.

This variable has a moderate effect on indent performance if set too
high, but stops indenting in the middle of long blocks if set too low."
  :type 'integer
  :group 'julia)

```

edit: backticks + which editor it is (doesn’t everybody use emacs ?)

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [March 30, 2018, 5:53am UTC](https://discourse.julialang.org/t/emacs-users-should-know-about-julia-max-block-lookback/10068/2 "2018-03-30T05:53:56Z")

</div>

What is the context here? Which editor?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [March 30, 2018, 6:24am UTC](https://discourse.julialang.org/t/emacs-users-should-know-about-julia-max-block-lookback/10068/3 "2018-03-30T06:24:56Z")

</div>

Possibly Emacs.

@purplishrock, please quote with [backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530). Also, cf [this issue](https://github.com/JuliaEditorSupport/julia-emacs/issues/5). I just made a comment there and will make a PR after some discussion.

---

<div class="post-metadata">

### Author: ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)
#### Post date: [March 30, 2018, 3:41pm UTC](https://discourse.julialang.org/t/emacs-users-should-know-about-julia-max-block-lookback/10068/4 "2018-03-30T15:41:31Z")

</div>

great! thanks for linking that issue.

i think 20000 would make a good default.

the largest file i have in my current project is 22000 characters and i consider it to be too large and in needing of some refactoring.
