From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Girard Subject: Re: [Babel] org-babel-execute-buffer gives different results than org-babel-exp-non-block-elements Date: Thu, 22 Aug 2013 21:28:27 +0200 Message-ID: References: <87y57twot4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e0158c4109058dc04e48e4c3b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCaYv-00028Y-MQ for emacs-orgmode@gnu.org; Thu, 22 Aug 2013 15:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCaYr-0004vW-5v for emacs-orgmode@gnu.org; Thu, 22 Aug 2013 15:28:53 -0400 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:37671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCaYq-0004vQ-QO for emacs-orgmode@gnu.org; Thu, 22 Aug 2013 15:28:49 -0400 Received: by mail-la0-f52.google.com with SMTP id ev20so1825958lab.11 for ; Thu, 22 Aug 2013 12:28:47 -0700 (PDT) In-Reply-To: <87y57twot4.fsf@gmail.com> 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 --089e0158c4109058dc04e48e4c3b Content-Type: text/plain; charset=ISO-8859-1 2013/8/22 Nicolas Goaziou : > > I get errors when trying to execute the buffer. Hi Nicolas, oh yes, my bad, there was a parenthesis missing. Attached is the corrected document. > Also, could you provide > a minimal example? The attached document is as minimal as you can get IMHO ; but admittedly I've been sparing with instructions ! Once loaded: 1. Evaluate the elisp code contained in the section "Code to evaluate", either by executing =(org-babel-load-file buffer-file-name)=, or by evaluating manually each function using =C-x C-e= 2. Run the small tests contained in the section "Transclusion tests" using =(org-babel-execute-buffer)=. This will behave as expected 3. Restore the buffer to its original contents using =C-_= 4. Now, run =(org-babel-exp-non-block-elements (point-min) (point-max))= and compare with the behaviour in step (2.) --089e0158c4109058dc04e48e4c3b Content-Type: application/octet-stream; name="transclusion.org" Content-Disposition: attachment; filename="transclusion.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hkod4vdk0 IytBVVRIT1I6IE5pY29sYXMgR2lyYXJkIDxnaXJhcmQubmljb2xhc0BnbWFpbC5jb20+CgoqIENv ZGUgdG8gZXZhbHVhdGUKRXZhbHVhdGUgd2l0aDogKG9yZy1iYWJlbC1sb2FkLWZpbGUgYnVmZmVy LWZpbGUtbmFtZSkKCioqIG5nL2RlY29kZS1saW5rCiMrQkVHSU5fU1JDIGVtYWNzLWxpc3AKICAo ZGVmdW4gbmcvZGVjb2RlLWxpbmsgKHMpCiAgICAiW1t4XVt5XV0gLT4gKHggLiB5KSIKICAgIChs ZXQgKGRlc2MgbGluaykKICAgICAgKHdoZW4KICAgICAgICAgIChzdHJpbmctbWF0Y2ggb3JnLWJy YWNrZXQtbGluay1yZWdleHAgcykKICAgICAgICAoc2V0cSBkZXNjIChpZiAobWF0Y2gtZW5kIDMp IChvcmctbWF0Y2gtc3RyaW5nLW5vLXByb3BlcnRpZXMgMyBzKSkpCiAgICAgICAgKHNldHEgbGlu ayAob3JnLWxpbmstdW5lc2NhcGUKICAgICAgICAgICAgICAgICAgICAob3JnLW1hdGNoLXN0cmlu Zy1uby1wcm9wZXJ0aWVzIDEgcykpKQogICAgICAgIChjb25zIGxpbmsgZGVzYykpKSkKIytFTkRf U1JDCioqIG5nL2dldC1zeW1saW5rLWlkCiMrQkVHSU5fU1JDIGVtYWNzLWxpc3AKICAoZGVmdW4g bmcvZ2V0LXN5bWxpbmstaWQgKHMpCiAgICAiW1tpZDo4ODgtNzddW2ZmZmZdXSAtPiA4ODgtNzci CiAgICAod2hlbiAKICAgICAgKGFuZCAoc3RyaW5nLW1hdGNoIG9yZy1icmFja2V0LWxpbmstcmVn ZXhwIHMpCiAgICAgICAgICAgKHNldHEgcyAobWF0Y2gtc3RyaW5nIDEgcykpCiAgICAgICAgICAg KHN0cmluZy1tYXRjaCAiXmlkXFw6XFwoW15dW10rXFwpIiBzKSkKICAgICAgKG1hdGNoLXN0cmlu ZyAxIHMpCiAgICAgICkpCiMrRU5EX1NSQwoqKiBuZy9kZWxldGUtY3VycmVudC1saW5lCiMrQkVH SU5fU1JDIGVtYWNzLWxpc3AKICAoZGVmdW4gbmcvZGVsZXRlLWN1cnJlbnQtbGluZSAoKQogICAg KGxldCAoKGIgKHBvaW50LWF0LWJvbCkpCiAgICAgICAgICAoZSAoKyAxIChwb2ludC1hdC1lb2wp KSkpCiAgICAgIChkZWxldGUtcmVnaW9uIGIgZSkpKQojK0VORF9TUkMKKiogbmcvb3JnLXRjCiMr QkVHSU5fU1JDIGVtYWNzLWxpc3AKICAoZGVmdW4gbmcvb3JnLXRjIChzKQogICAgKGxldCogKChh dC1oZWFkaW5nLXAgKG9yZy1hdC1oZWFkaW5nLXApKQogICAgICAgICAgIChkZWMgKG5nL2RlY29k ZS1saW5rIHMpKQogICAgICAgICAgIChsaW5rIChmaXJzdCBkZWMpKQogICAgICAgICAgIChuZXct dGl0bGUgKHJlc3QgZGVjKSkKICAgICAgICAgICAoaWQgKG9yIChuZy9nZXQtc3ltbGluay1pZCBz KSBsaW5rKSkKICAgICAgICAgICAobHYtcHJvcCAiX0NVUlJFTlRfTEVWRUxfIikKICAgICAgICAg ICAoY3Vyci1sdiAob3IgKG9yZy1jdXJyZW50LWxldmVsKSAwKSkKICAgICAgICAgICA7KG9sZC1s diAoc3RyaW5nLXRvLW51bWJlciAKICAgICAgICAgICA7ICAgICAgICAgKG9yIChvcmctZW50cnkt Z2V0LXdpdGgtaW5oZXJpdGFuY2UgbHYtcHJvcCkgY3Vyci1sdikpKQogICAgICAgICAgICkKICAg ICAgKHVubGVzcyBpZAogICAgICAgIChlcnJvciAoZm9ybWF0ICJObyBpZCBmb3VuZDogJXMiIHMp KSkKICAgICAgKG5nL2RlbGV0ZS1jdXJyZW50LWxpbmUpCiAgICAgIChzYXZlLWV4Y3Vyc2lvbgog ICAgICAgIChzYXZlLXdpbmRvdy1leGN1cnNpb24KICAgICAgICAgIChvcmctaWQtb3BlbiBpZCkK ICAgICAgICAgIChvcmctY29weS1zdWJ0cmVlKSkpCiAgICAgIChtZXNzYWdlIChmb3JtYXQgIkxl dmVsczogJXMgLyAlcyIgY3Vyci1sdiBvbGQtbHYpKQogICAgICAod2l0aC10ZW1wLWJ1ZmZlcgog ICAgICAgIChvcmctbW9kZSkKICAgICAgICAob3JnLXBhc3RlLXN1YnRyZWUgY3Vyci1sdiBuaWwg bmlsKQogICAgICAgIChvcmctZGVsZXRlLXByb3BlcnR5ICJJRCIpIDsgcHJldmVudHMgSUQgZHVw bGljYXRpb24gaWYgYW4gZW50cnkgZ2V0cyBwYXN0ZWQgc2V2ZXJhbCB0aW1lcwogICAgICAgIChv cmctc2V0LXByb3BlcnR5IGx2LXByb3AgKGZvcm1hdCAiJWQiIG9sZC1sdikpCiAgICAgICAgKG9y Zy1iYWNrLXRvLWhlYWRpbmcpCiAgICAgICAgKGlmIGF0LWhlYWRpbmctcAogICAgICAgICAgKHBy b2duCiAgICAgICAgICAgIDsgUmVuYW1lIHRoZSBoZWFkaW5nCiAgICAgICAgICAgIChyZXBsYWNl LXN0cmluZyAobmcvb3JnLWdldC1lbnRyeS10aXRsZSkgbmV3LXRpdGxlIG5pbCAocG9pbnQpIChw b2ludC1hdC1lb2wpKSkKICAgICAgICAgIDsgYm9keSBvbmx5CiAgICAgICAgICAocHJvZ24KICAg ICAgICAgICAgKG5nL2RlbGV0ZS1jdXJyZW50LWxpbmUpKSkKICAgICAgICAoYnVmZmVyLXN0cmlu ZykpKSkKIytFTkRfU1JDCiogU291cmNlIGJsb2NrcwoqKiBTb3VyY2UgYmxvYyAxCjpQUk9Q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