# Documenter - @autodocs example evaluation - functions order

**URL:** https://discourse.julialang.org/t/documenter-autodocs-example-evaluation-functions-order/28529
**Category:** General Usage
**Tags:** package, documentation, documenter
**Created:** [September 8, 2019, 4:46am UTC](https://discourse.julialang.org/t/documenter-autodocs-example-evaluation-functions-order/28529 "2019-09-08T04:46:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)
#### Post date: [September 8, 2019, 4:46am UTC](https://discourse.julialang.org/t/documenter-autodocs-example-evaluation-functions-order/28529/1 "2019-09-08T04:46:28Z")

</div>

I have two questions regarding @autodocs in Documenter.

- How can I evaluate the examples in the docstrings when I use `@autodocs`?

- The order of functions that appear when I use `@index` and `@autodocs` is based on alphabet, while I want it to be in the order that the functions appear in the code. Is this a known issue?  
For instance for my MatLang package:  
[Functions List · MatLang](https://juliamatlab.github.io/MatLang/dev/functions/)

---

<div class="post-metadata">

### Author: ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)
#### Post date: [September 8, 2019, 10:04pm UTC](https://discourse.julialang.org/t/documenter-autodocs-example-evaluation-functions-order/28529/2 "2019-09-08T22:04:10Z")

</div>

> [@Amin\_Yahyaabadi](#):
>
> - How can I evaluate the examples in the docstrings when I use `@autodocs` ?

You can not. The at-blocks generally on work on the Markdown pages. My view is that docstrings need to stay readable in the REPL, so you shouldn’t have generated content there (unless you have some [DocStringExtensions](https://github.com/JuliaDocs/DocStringExtensions.jl)-like solution).

> [@Amin\_Yahyaabadi](#):
>
> - The order of functions that appear when I use `@index` and `@autodocs` is based on alphabet, while I want it to be in the order that the functions appear in the code. Is this a known issue?  
> For instance for my MatLang package:  
> [https://juliamatlab.github.io/MatLang/dev/functions/](https://juliamatlab.github.io/MatLang/dev/functions/)

I am not sure if “order in which they appear in the code” is completely well-defined. But if I remember correctly, the docstrings do get stored in order in which they are parsed, so the information is there. Feel free to open an issue to discuss this further – we could potentially have some sort of a `Sort` option for at-autodocs. The sorting of the autodocs docstrings appears to be [happening here](https://github.com/JuliaDocs/Documenter.jl/blob/6a409bbfd394352bfd33148f1acc24ce2fa1024b/src/Expanders.jl#L434-L446).

On the other hand, I have a feeling that if you do really care about the order in which the docstrings appear, you should probably be curating that manually with at-docs blocks.

---

<div class="post-metadata">

### Author: ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)
#### Post date: [September 22, 2019, 1:02am UTC](https://discourse.julialang.org/t/documenter-autodocs-example-evaluation-functions-order/28529/3 "2019-09-22T01:02:37Z")

</div>

I have created the issue two weeks ago.  
[https://github.com/JuliaDocs/Documenter.jl/issues/1127](https://github.com/JuliaDocs/Documenter.jl/issues/1127)

I tried to solve the issue myself but disabling this section of the code doesn’t seem to have any effect on document creation. Also, the debugger skips the breakpoints. How can I debug a doc creation in Documenter?  
There is a similar code also in [https://github.com/JuliaDocs/Documenter.jl/blob/6a409bbfd394352bfd33148f1acc24ce2fa1024b/src/Documents.jl#L405-L418](https://github.com/JuliaDocs/Documenter.jl/blob/6a409bbfd394352bfd33148f1acc24ce2fa1024b/src/Documents.jl#L405-L418) which seem to sort some index links.
