From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou 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 14:20:04 +0100 Message-ID: <87622mbtvf.fsf@gmail.com> References: <87ip6o9h2e.fsf@gmail.com> <871udbapqn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyMjH-0005Vv-L9 for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 08:20:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TyMjA-00043r-Qj for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 08:20:31 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:44459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TyMjA-00043k-KD for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 08:20:24 -0500 Received: by mail-wi0-f178.google.com with SMTP id hn3so427331wib.11 for ; Thu, 24 Jan 2013 05:20:23 -0800 (PST) In-Reply-To: (=?utf-8?B?ItCU0Y8=?= =?utf-8?B?0LTQvtCyINCS0LDRgdC40Lsg0KHRgtC+0Y/QvdC+0LIiJ3M=?= message of "Thu, 24 Jan 2013 11:58:17 +0400") 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: =?utf-8?B?0JTRj9C00L7QsiDQktCw0YHQuNC7INCh0YLQvtGP?= =?utf-8?B?0L3QvtCy?= Cc: emacs-orgmode@gnu.org Hello, vdyadov@elvees.com (=D0=94=D1=8F=D0=B4=D0=BE=D0=B2 =D0=92=D0=B0=D1=81=D0=B8= =D0=BB =D0=A1=D1=82=D0=BE=D1=8F=D0=BD=D0=BE=D0=B2) writes: > 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). My remark about syntax was orthogonal to your patch. I was just pointing out you used a wrong example. Eric Schulte will know better than me about your patch. > Of course, org-babel behavior may be easily changed to dissallow empty > lines between #+attr_...: and #+results:. It would be better, indeed. > But currently org-elements allows next construction: > > ,---- > | #+attr_html: alt=3D"big image" width=3D"100%" > | ^=20 > | | > | +- several empty lines between attr and file > | | > | v > | file:123.png > `---- Of course not. With: #+attr_html: alt=3D"big image" width=3D"100%" file:123.png (org-element-property :attr_html (org-element-at-point)) with point at "file:..." will return ("alt=3D\"big image\" width=3D\"100%\"") while on the following example: #+attr_html: alt=3D"big image" width=3D"100%" file:123.png it will return nil. =20=20 > 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. Babel behaviour is already slightly different from Elements's. In the long run it will be necessary to correct this. > 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. You may have a look at the comments at the start of org-elements.el. At some point, I will have to write an Info doc about this library, unless I postpone it until the end of time. Regards, --=20 Nicolas Goaziou