emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] babel results handling


From: Eric Schulte
Subject: Re: [O] babel results handling
Date: Wed, 03 Apr 2013 08:18:09 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Rick Frankel <address@hidden> writes:

> On Sun, Mar 31, 2013 at 07:37:38AM -0600, Eric Schulte wrote:
>> It is certainly true that Emacs Lisp is treated differently than all
>> other languages.  There are also significant differences between
>> languages, e.g., session evaluation doesn't make sense for some
>> languages, and for other languages session evaluation is the only type
>> of evaluation that does make sense.
>> 
>> In addition to that, with over 40 supported languages [1], There
>> undoubtedly are cases where we are doing a bad job of ensuring
>> inter-languages consistency.  If you can find concise examples which use
>> demonstrate significant inconsistencies between languages, then we
>> should be able to resolve those on a case by case basis.  In general I
>> think ob-sh is probably the most widely used code block language, and
>> can be treated as the gold standard against which other languages should
>> be compared.
>
> `sh' is probably not the best choice as a "gold standard" due to the
> fact that it only supports STDOUT ("output" and not "value").
>
> Many of the languages are obviously not general purpose, or do not
> support (like shell), wrapped values (only STDOUT), or don't generate
> text, so consistency does not matter (e.g., css, sass, sql, sqlite,
> plantuml, dot).
>
> Regardless, the attached org file is a first step an comparing the
> result processing of some languages (specifically, sh, emacs-lisp,
> perl and ruby), which, I think, covers a good portion of the babel use
> of general purpose languages.
>

This is a great file.  Thanks for generating it and sharing it.
Although I think it would be more useful if languages were the smallest
scale of organization rather than the largest to make cross-language
comparison easier.

Would it be difficult to add another set of code blocks which
automatically compare the output of these automatically generated code
blocks, indicating when there are differences.

>
> The upshot, is that perl value results match shell value/output
> results and emacs-lisp, python and ruby all return about the same
> results (elisp returns the quote characters from a verbatim string).
>

What are the perl-shell vs. python-ruby-elisp differences?

>
> I still think that the scalar pipe-delimited processing from shell and
> perl is wrong in that pipe-delimited data ends up w/ an extra column
> if each line starts w/ a pipe, but not if the pipe is used like a
> csv separator (between columns but not at the beginning or end of the
> line).
>

If you want to use pipes to delimit data, then I'd suggest *not*
interpreting the data as a value, but rather doing something like
":results verbatim drawer".  Generally pipes aren't considered to be
table column delimiters, I'd try tabs or spaces instead.

>
> Also, looking at the manual
> (http://orgmode.org/manual/results.html#results) vs. the code, are
> there are actually four classes of :results arguments with type broken
> into type and format?
>
>      - Type :: (file list vector table scalar verbatim)
>      - Format :: (raw html latex org code pp drawer)
>

Yes, this does seem to be more clear.  If you're willing to supply a
documentation patch I'd be very happy to apply it.

Thanks!

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

[Prev in Thread] Current Thread [Next in Thread]