From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Alekseyev Subject: [bugs] Export to HTML requires issuing org-babel-execute-buffer; results replace fails Date: Fri, 20 Jan 2012 18:25:57 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8ff1ccec5094a204b6fed720 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoOmO-0004Nn-EG for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 19:26:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoOmM-0000Em-Pl for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 19:26:00 -0500 Received: from mail-pz0-f41.google.com ([209.85.210.41]:60108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoOmM-0000EG-DP for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 19:25:58 -0500 Received: by dang27 with SMTP id g27so732285dan.0 for ; Fri, 20 Jan 2012 16:25:57 -0800 (PST) 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: Emacs orgmode --e89a8ff1ccec5094a204b6fed720 Content-Type: text/plain; charset=ISO-8859-1 Since all source blocks are evaluated on export, I don't think it should be necessary to issue org-babel-execute-buffer before invoking export. However, running HTML export without org-babel-execute-buffer currently produces garbage output. On the other hand, I have several examples where running HTML export _after_ org-babel-execute-buffer produces the wrong output due to the fact that :results replace directive appears to append instead of replacing the output I am attaching three simple examples where I simulate generating and exporting image data (I just generate and print filenames). If I understand the documentation correctly, they are all supposed to produce identical output on HTML export; however, none of the files produces the expected output, namely, blocks of the form: ---- | some output | images/conv1.png | | images/conv1.png \-- Here, the first two lines should be enclosed in a code block, and the last line should be raw org output. To reproduce, load any of my examples, do C-c C-e h <- will produce garbage output on export C-c C-v b <- will produce expected output in the buffer C-c C-e h <- will produce extraneous output on export despite :results replace being on C-c C-v b <- will produce extraneous output in the buffer This was tested on my test-export4.org, but the other examples behave in a similar fashion. --Leo --e89a8ff1ccec5094a204b6fed720 Content-Type: application/octet-stream; name="test-export4.org" Content-Disposition: attachment; filename="test-export4.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxnwcis40 Iytwcm9wZXJ0eTogc2Vzc2lvbiAqUi1iYWJlbCoKCiogZXhwb3J0IGZhaWwKCiMrTkFNRTogZm9v CiMrSEVBREVSOiA6dmFyIGlkeD0xIDp2YXIgcHJpbnQ9IlRSVUUiIDp2YXIgcGxvdC5maWxlbmFt ZT0iY29udjEucG5nIiA6dmFyIHBsb3QuZGlzcD0iRkFMU0UiCiMrQkVHSU5fU1JDIFIgOnJlc3Vs dHMgb3V0cHV0IHNpbGVudAogIGlmIChwcmludCA9PSBUUlVFKSB7Y2F0KCJzb21lIG91dHB1dFxu Iil9CiAgCiAgaW1nLmRpciA9ICJpbWFnZXMiCiAgY2F0LmZuYW1lLmxpbmsgPC0gZnVuY3Rpb24o KSB7IGNhdChpbWcuZGlyLCIvIixwbG90LmZpbGVuYW1lLCJcbiIsc2VwPSIiKSB9IAogIGNhdC5m bmFtZS5saW5rKCkgCiMrRU5EX1NSQwoKU2hvdWxkIGhhdmUgYWxsIGNvbnYxIHN0dWZmCgojK2Nh bGw6IGZvbyhpZHg9MSxwcmludD0iVFJVRSIscGxvdC5maWxlbmFtZT0iY29udjEucG5nIixwbG90 LmRpc3A9IkZBTFNFIikKCnNyY19SWzpyZXN1bHRzIG91dHB1dCByZXBsYWNlXXsgY2F0LmZuYW1l LmxpbmsoKSB9IAoKU2hvdWxkIGhhdmUgYWxsIGNvbnYyIHN0dWZmIAoKIytjYWxsOiBmb28oaWR4 PTgscHJpbnQ9IlRSVUUiLHBsb3QuZmlsZW5hbWU9ImNvbnYyLnBuZyIscGxvdC5kaXNwPSJGQUxT RSIpCgpzcmNfUls6cmVzdWx0cyBvdXRwdXQgcmVwbGFjZV17IGNhdC5mbmFtZS5saW5rKCkgfSAK ClNob3VsZCBoYXZlIGFsbCBjb252MyBzdHVmZgojK2NhbGw6IGZvbyhpZHg9MSxwcmludD0iVFJV RSIscGxvdC5maWxlbmFtZT0iY29udjMucG5nIixwbG90LmRpc3A9IkZBTFNFIikKCnNyY19SWzpy ZXN1bHRzIG91dHB1dCByZXBsYWNlXXsgY2F0LmZuYW1lLmxpbmsoKSB9IAoK --e89a8ff1ccec5094a204b6fed720 Content-Type: application/octet-stream; name="test-export5.org" Content-Disposition: attachment; filename="test-export5.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxnwcy3l1 Iytwcm9wZXJ0eTogc2Vzc2lvbiAqUi1iYWJlbCoKCiogZXhwb3J0IGZhaWwKCiMrTkFNRTogZm9v CiMrSEVBREVSOiA6dmFyIGlkeD0xIDp2YXIgcHJpbnQ9IlRSVUUiIDp2YXIgcGxvdC5maWxlbmFt ZT0iY29udjEucG5nIiA6dmFyIHBsb3QuZGlzcD0iRkFMU0UiCiMrQkVHSU5fU1JDIFIgOnJlc3Vs dHMgb3V0cHV0IHNpbGVudAogIGlmIChwcmludCA9PSBUUlVFKSB7Y2F0KCJzb21lIG91dHB1dFxu Iil9CiAgCiAgaW1nLmRpciA9ICJpbWFnZXMiCiAgY2F0LmZuYW1lLmxpbmsgPC0gZnVuY3Rpb24o KSB7IGNhdChpbWcuZGlyLCIvIixwbG90LmZpbGVuYW1lLCJcbiIsc2VwPSIiKSB9IAogIGNhdC5m bmFtZS5saW5rKCkgCiMrRU5EX1NSQwoKU2hvdWxkIGhhdmUgYWxsIGNvbnYxIHN0dWZmCgojK2Nh bGw6IGZvbyhpZHg9MSxwcmludD0iVFJVRSIscGxvdC5maWxlbmFtZT0iY29udjEucG5nIixwbG90 LmRpc3A9IkZBTFNFIikKCiMrYmVnaW5fc3JjIFIgOnJlc3VsdHMgb3V0cHV0IHJhdyByZXBsYWNl IDpleHBvcnRzIHJlc3VsdHMKIGNhdC5mbmFtZS5saW5rKCkgCiMrZW5kX3NyYwoKU2hvdWxkIGhh dmUgYWxsIGNvbnYyIHN0dWZmIAoKIytjYWxsOiBmb28oaWR4PTgscHJpbnQ9IlRSVUUiLHBsb3Qu ZmlsZW5hbWU9ImNvbnYyLnBuZyIscGxvdC5kaXNwPSJGQUxTRSIpCgojK2JlZ2luX3NyYyBSIDpy ZXN1bHRzIG91dHB1dCByYXcgcmVwbGFjZSA6ZXhwb3J0cyByZXN1bHRzCiBjYXQuZm5hbWUubGlu aygpIAojK2VuZF9zcmMKClNob3VsZCBoYXZlIGFsbCBjb252MyBzdHVmZgoKIytjYWxsOiBmb28o aWR4PTEscHJpbnQ9IlRSVUUiLHBsb3QuZmlsZW5hbWU9ImNvbnYzLnBuZyIscGxvdC5kaXNwPSJG QUxTRSIpCgojK2JlZ2luX3NyYyBSIDpyZXN1bHRzIG91dHB1dCByYXcgcmVwbGFjZSA6ZXhwb3J0 cyByZXN1bHRzCiBjYXQuZm5hbWUubGluaygpIAojK2VuZF9zcmMKCgo= --e89a8ff1ccec5094a204b6fed720 Content-Type: application/octet-stream; name="test-export7.org" Content-Disposition: attachment; filename="test-export7.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxnwd6wu2 Iytwcm9wZXJ0eTogc2Vzc2lvbiAqUi1iYWJlbCoKCiogZXhwb3J0IGZhaWwKCiMrTkFNRTogZm9v CiMrSEVBREVSOiA6dmFyIGlkeD0xIDp2YXIgcHJpbnQ9IlRSVUUiIDp2YXIgcGxvdC5maWxlbmFt ZT0iY29udjEucG5nIiA6dmFyIHBsb3QuZGlzcD0iRkFMU0UiCiMrQkVHSU5fU1JDIFIgOnJlc3Vs dHMgb3V0cHV0IHNpbGVudAogIGlmIChwcmludCA9PSBUUlVFKSB7Y2F0KCJzb21lIG91dHB1dFxu Iil9CiAgCiAgaW1nLmRpciA9ICJpbWFnZ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