From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Restore raw output in LaTeX export from in-line code block Date: Wed, 02 Oct 2013 07:28:07 -0600 Message-ID: <87haczol8i.fsf@gmail.com> References: <87mwmvqum2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRMTs-0001Yf-LT for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 09:28:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRMTn-0006kX-MA for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 09:28:44 -0400 Received: from mail-pb0-x22d.google.com ([2607:f8b0:400e:c01::22d]:55477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRMTn-0006kO-D3 for emacs-orgmode@gnu.org; Wed, 02 Oct 2013 09:28:39 -0400 Received: by mail-pb0-f45.google.com with SMTP id mc17so874844pbc.18 for ; Wed, 02 Oct 2013 06:28:37 -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: Liam Healy Cc: Org-mode mailing list --=-=-= Content-Type: text/plain Liam Healy writes: > On Sun, Sep 29, 2013 at 3:46 PM, Eric Schulte wrote: >> Liam Healy writes: >> >>> I noticed that raw results from in-line code blocks were disappearing in >>> the new LaTeX exporter, and bisected the repo to the change 7117ad4f92. I >>> have created the attached patch to fix the problem and restore the previous >>> behavior. >>> >>> example file >>> * Test >>> 1. Inline common lisp raw: src_lisp[:results raw]{(+ 2 2)}, should >>> say 4. >>> >>> >>> Desired output, restored by patch >>> \item Inline common lisp raw: 4, should say 4. >>> Output without patch >>> \item Inline common lisp raw: , should say 4. >>> >>> If this looks right, please apply. >>> >>> Liam >>> >> >> Hi Liam, >> >> You're actually noticing a symptom of an error in the way lisp code >> blocks were handling results (conflating the output/results and the >> scalar/vector distinction). I've just pushed up a fix, please let me >> know if you continue to see these types of errors. >> >> Best, >> >> -- >> Eric Schulte >> https://cs.unm.edu/~eschulte >> PGP: 0x614CA05D > > Thanks Eric. Indeed, your patches work to produce the correct output > for that case. Now I have another problem. I'm really not interested > in producing "4" of course, what I do is use lisp to produce LaTeX. > For example, > > + Inline common lisp raw: $src_lisp[:results raw]{(format nil > "\\sqrt{2~c" (code-char 125))}$, should say "$\sqrt{2}$". > > Which used to produce (Org-mode version 7.9.4) the right thing, > \item Inline common lisp raw: $\sqrt{2}$, should say ``$\sqrt{2}$". > and now (Org-mode version 8.2.1) doesn't evaluate the lisp, > \item Inline common lisp raw: $src_lisp[:results raw]{(format nil > "\\sqrt{2~c" (code-char 125))}$, should say "$\sqrt{2}$". > > Is this a bug? How do I restore the evaluation of the src_lisp in this context? > When I export a file such as the following, --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=example-w-lisp.org #+Options: ^:{} inline src_lisp[:results raw]{(format nil "\\sqrt{2~c" (code-char 125))} works --=-=-= Content-Type: text/plain I do find that inline code blocks are evaluated on export resulting in the following. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=example-w-lisp.txt Content-Transfer-Encoding: base64 ICAgICAgICAgICAgICAgICAgICAgICAgICAgIOKUgeKUgeKUgeKUgeKUgeKUgeKUgeKUgeKUgeKU geKUgeKUgeKUgeKUgeKUgeKUgQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFWEFNUExF LVctTElTUA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIOKUgeKUgeKUgeKUgeKUgeKUgeKU geKUgeKUgeKUgeKUgeKUgeKUgeKUgeKUgeKUgQ0KDQoNClRhYmxlIG9mIENvbnRlbnRzDQrilIDi lIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIANCg0KDQoNCg0K aW5saW5lICJcXHNxcnR7Mn0iIHdvcmtzDQo= --=-=-= Content-Type: text/plain Are you able to interactively execute inline code blocks? I'm not sure what the issue could be. Best, > > Thanks. > Liam -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D --=-=-=--