emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Liam Healy <lnp@healy.washington.dc.us>
Cc: Org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Restore raw output in LaTeX export from in-line code block
Date: Wed, 02 Oct 2013 07:28:07 -0600	[thread overview]
Message-ID: <87haczol8i.fsf@gmail.com> (raw)
In-Reply-To: CADe9tL6KOdz0VdGuU=JuBtGRXZpYOmZzM8fUoPHGzHW1xmsLuQ@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

Liam Healy <lnp@healy.washington.dc.us> writes:

> On Sun, Sep 29, 2013 at 3:46 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
>> Liam Healy <lnp@healy.washington.dc.us> 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,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example-w-lisp.org --]
[-- Type: text/x-org, Size: 96 bytes --]

#+Options: ^:{}

inline src_lisp[:results raw]{(format nil "\\sqrt{2~c" (code-char 125))} works

[-- Attachment #3: Type: text/plain, Size: 88 bytes --]


I do find that inline code blocks are evaluated on export resulting in
the following.


[-- Attachment #4: example-w-lisp.txt --]
[-- Type: text/plain, Size: 311 bytes --]

                            ━━━━━━━━━━━━━━━━
                             EXAMPLE-W-LISP
                            ━━━━━━━━━━━━━━━━


Table of Contents
─────────────────




inline "\\sqrt{2}" works

[-- Attachment #5: Type: text/plain, Size: 188 bytes --]


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

  reply	other threads:[~2013-10-02 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28 19:19 Restore raw output in LaTeX export from in-line code block Liam Healy
2013-09-29 19:46 ` Eric Schulte
2013-10-01 23:36   ` Liam Healy
2013-10-02 13:28     ` Eric Schulte [this message]
2013-10-06 14:28       ` Liam Healy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87haczol8i.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=lnp@healy.washington.dc.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).