From mboxrd@z Thu Jan 1 00:00:00 1970 From: KDr2 Subject: [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode Date: Wed, 2 Apr 2014 11:48:11 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=f46d0447f0da80ae9304f60728cd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVCAE-0001n1-Ee for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 23:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVCAD-0006hu-4X for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 23:48:34 -0400 Received: from mail-ob0-x22c.google.com ([2607:f8b0:4003:c01::22c]:36254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVCAC-0006hk-Tm for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 23:48:33 -0400 Received: by mail-ob0-f172.google.com with SMTP id wm4so12152587obc.3 for ; Tue, 01 Apr 2014 20:48:31 -0700 (PDT) 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@gnu.org --f46d0447f0da80ae9304f60728cd Content-Type: multipart/alternative; boundary=f46d0447f0da80ae8f04f60728cb --f46d0447f0da80ae8f04f60728cb Content-Type: text/plain; charset=ISO-8859-1 The bug: write file ~/scheme-test.org with the content below: -------8<-------------- #+BEGIN_SRC scheme :exports results :results output raw (display "Hello Scheme in OrgMode") #+END_SRC -------8<-------------- and run: emacs --batch --eval='(load "~/.emacs.d/init.el")' ~/scheme-test.org -f org-html-export-to-html you will find the bug: `org-babel-scheme-execute-with-geiser' uses `current-message' to get the results of scheme code blocks, but `current-message' always returns nil in batch mode, and this patch fixes this. -- -- KDr2, http://kdr2.com --f46d0447f0da80ae8f04f60728cb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The bug:
write file ~/scheme-test.org with the content below:
--= -----8<--------------
#+BEGIN_SRC scheme :exports results= :results output raw
=A0 (display "Hello Scheme in OrgMode")
#+END_SRC<= /div>
-------8<--------------

and run= :

emacs --batch --eval=3D'(load "~/.emacs= .d/init.el")' ~/scheme-test.org= -f org-html-export-to-html

you will find the bug:

`= org-babel-scheme-execute-with-geiser' uses `current-message' to get= the results of scheme code blocks, but `current-message' always return= s nil in batch mode, and this patch fixes this.

--
--=A0
--f46d0447f0da80ae8f04f60728cb-- --f46d0447f0da80ae9304f60728cd Content-Type: text/x-patch; charset=US-ASCII; name="0001-ob-scheme.el-Fix-scheme-code-blocks-execution-error-.patch" Content-Disposition: attachment; filename="0001-ob-scheme.el-Fix-scheme-code-blocks-execution-error-.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hti1k16x0 RnJvbSBjZWJmOWZjNGZlMDlhYjIyZmQzMWZmOGU1NjA2ZDBmNjgwYzEyMWU5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLRHIyIDxraWxseS5kcmF3QGdtYWlsLmNvbT4KRGF0ZTogV2Vk LCAyIEFwciAyMDE0IDEwOjMwOjM4ICswODAwClN1YmplY3Q6IFtQQVRDSF0gb2Itc2NoZW1lLmVs OiBGaXggc2NoZW1lIGNvZGUgYmxvY2tzIGV4ZWN1dGlvbiBlcnJvciBpbiBiYXRjaAogbW9kZQoK KiBsaXNwL29iLXNjaGVtZS5lbCAob3JnLWJhYmVsLXNjaGVtZS1jYXB0dXJlLWN1cnJlbnQtbWVz c2FnZSwgb3JnLWJhYmVsLXNjaGVtZS1leGVjdXRlLXdpdGgtZ2Vpc2VyKTogQ2FwdHVyZSBzY2hl bWUgY29kZSByZXN1bHRzIHZpYSBjdXJyZW50LW1lc3NhZ2UgYm90aCBpbiB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