From mboxrd@z Thu Jan 1 00:00:00 1970 From: vdyadov@elvees.com (=?utf-8?B?0JTRj9C00L7QsiDQktCw0YHQuNC7INCh0YI=?= =?utf-8?B?0L7Rj9C90L7Qsg==?=) Subject: Re: Bug: [PATCH] Org-babel: separate #+attr_... for code block and for results block [7.9.3d (release_7.9.3d-834-g60083a.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)] Date: Thu, 24 Jan 2013 11:58:17 +0400 Message-ID: References: <87ip6o9h2e.fsf@gmail.com> <871udbapqn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyHgy-0000vQ-7x for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 02:57:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyHgv-0005vm-AP for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 02:57:48 -0500 Received: from mail.elvees.com ([80.90.126.250]:53493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyHgu-0005vU-V8 for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 02:57:45 -0500 In-Reply-To: <871udbapqn.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 23 Jan 2013 16:22:24 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hi, Nicolas Goaziou 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