From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjarte Johansen Subject: Stop conversion of result on serialising to file Date: Tue, 26 May 2015 13:11:44 +0200 Message-ID: <99992A62-FF6D-4A83-90C8-C8B7FBB5AE03@infomedia.uib.no> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_E3CE3598-CE1D-49E5-A4F7-B23C04187CD9" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxCm1-0004SN-26 for emacs-orgmode@gnu.org; Tue, 26 May 2015 07:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxClx-0002n2-T4 for emacs-orgmode@gnu.org; Tue, 26 May 2015 07:11:52 -0400 Received: from alfons.uib.no ([2001:700:200:30::141]:47950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxClx-0002fe-MC for emacs-orgmode@gnu.org; Tue, 26 May 2015 07:11:49 -0400 Received: from alfux.uib.no (smtp.uib.no) [2001:700:200:6::a:1f0c] by alfons.uib.no for emacs-orgmode@gnu.org with esmtp (Exim 4.84) id 1YxCls-0003u4-ML; Tue, 26 May 2015 13:11:44 +0200 Received: from pc-115-155.eduroam.uib.no [129.177.115.155]:55857 by smtp.uib.no for emacs-orgmode@gnu.org with esmtpsa (Exim 4.84) id 1YxCls-0003XM-Dh; Tue, 26 May 2015 13:11:44 +0200 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 --Apple-Mail=_E3CE3598-CE1D-49E5-A4F7-B23C04187CD9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii When running a source block and storing the result in a file the data = will first be converted to a table in org-babel-result-cond and then = converted back to text when org-babel-execute-src-block writes it to = file. This is takes a very long time when the result is big and it is = unnecessary. I have attached a patch that makes org-babel-result-cond = return the scalar result when it knows the result will be turned into a = file. Regards, Bjarte --Apple-Mail=_E3CE3598-CE1D-49E5-A4F7-B23C04187CD9 Content-Disposition: attachment; filename=0001-ob-core-Do-not-return-results-on-writing-to-file.patch Content-Type: application/octet-stream; name="0001-ob-core-Do-not-return-results-on-writing-to-file.patch" Content-Transfer-Encoding: quoted-printable =46rom=20931dabfe93d9e78e1ee79664a0a555433956511d=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Bjarte=20Johansen=20= =0ADate:=20Tue,=2026=20May=202015=2012:54:14=20= +0200=0ASubject:=20[PATCH]=20ob-core:=20Do=20not=20return=20results=20on=20= writing=20to=20file=0A=0AWhen=20writing=20the=20result=20to=20file=20we=20= do=20not=20need=20to=20first=20convert=20the=0Adata=20to=20a=20table=20= since=20it=20is=20just=20converted=20back=20when=0A= org-babel-execute-src-block=20serializes=20the=20result=20to=20file.=0A=0A= *=20ob-core=20(org-babel-result-cond):=20Add=20"file"=20as=20a=20param=20= that=20returns=0A=20=20a=20scalar=20result.=0A---=0A=20lisp/ob-core.el=20= |=201=20+=0A=201=20file=20changed,=201=20insertion(+)=0A=0Adiff=20--git=20= a/lisp/ob-core.el=20b/lisp/ob-core.el=0Aindex=20f4a8345..6821b6d=20= 100644=0A---=20a/lisp/ob-core.el=0A+++=20b/lisp/ob-core.el=0A@@=20= -2979,6=20+2979,7=20@@=20Emacs=20shutdown."))=0A=20=09=09=20(member=20= "html"=20,params)=0A=20=09=09=20(member=20"code"=20,params)=0A=20=09=09=20= (member=20"pp"=20,params)=0A+=09=09=20(member=20"file"=20,params)=0A=20=09= =09=20(and=20(or=20(member=20"output"=20,params)=0A=20=09=09=09=20=20= (member=20"raw"=20=20=20=20,params)=0A=20=09=09=09=20=20(member=20"org"=20= =20=20=20,params)=0A--=20=0A2.3.2=20(Apple=20Git-55)=0A=0A= --Apple-Mail=_E3CE3598-CE1D-49E5-A4F7-B23C04187CD9--