Hi,

Nicolas Goaziou <n.goaz...@gmail.com> writes:

> Affiliated keywords have to be put above elements they refer to, without
> a blank line in-between.

Ok.

> Elements doesn't care about order for affiliated keywords (here results
> and attr_html), but Babel, which isn't built on Elements (yet), does.
>
> Hence, I suggest:
>
>   #+attr_html: ...
>   #+results: ...
>   file

With my patch to ob-core.el org-babel works fine with your suggestion. It
just skips #+attr_...: lines as blank lines (original behaviour of
org-babel is to skip blank lines between #+end_src and #+results, when
it searches results block for updating). Of course, org-babel behavior
may be easily changed to dissallow empty lines between #+attr_...: and
#+results:. 

But currently org-elements allows next construction:

,----
| #+attr_html: alt="big image" width="100%"
|  ^ 
|  |
|  +- several empty lines between attr and file
|  |
|  v
| file:123.png
`----

That is why I think that it is not necessary to make org-babel behavior
different from org-elements (to dissalow empty lines between #+attr and
#+results when it searches results block), at least for now.

PS: Is there any good documentation and explanation of org-mode
internals? I could help a little with rewritting org-babel to use
org-elements.


With best regards,
Vasil

Reply via email to