Thanks for your hint.
The problem was not in in org.el:org-indent-block but in
org.el:org-hide-block-toggle.
This function should toggle special-block blocks too, else it barfs on them.
In my setup, when an org file is restored by desktop.el, global visibility
is set, which triggers
calls to org-hide-block-all.

Fabrice

2014-09-12 9:53 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > Recently, I started to get problems with org-indent-block returning
> errors
> > "Not at a block".
> > Unfortunately, this is happening while restarting emacs, and I have no
> idea
> > about how to debug it.
>
> AFAICT, nothing in the code base calls `org-indent-block' automatically.
> Out of curiosity, is there something in your setup doing this?
>
> > It would be nice if somehow this function could give the file and the
> point
> > in the file where the error is happening.
> > Any idea on how to achieve this?
>
> It is an interactive function, so the user is expected to know where he
> called it. Anyway, you could modify function in "org.el" to use:
>
>   (user-error "Not at a block in %s, line %s" (buffer-name)
> (org-current-line))
>
> It will probably help understanding the issue.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

Reply via email to