From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: babel results handling Date: Wed, 03 Apr 2013 20:02:39 +0200 Message-ID: <87zjxfbigw.fsf@Rainer.invalid> References: <20130329014615.GA49671@BigDog.local> <87wqsq6yd1.fsf@gmail.com> <20130329214238.GA53401@BigDog.local> <87r4ixah7y.fsf@gmail.com> <20130330234151.GA53721@BigDog.local> <87mwtkqtzh.fsf@gmail.com> <20130331122900.GA57939@BigDog.local> <87ip47r8pp.fsf@gmail.com> <20130401162204.GA89231@BigDog.local> <87r4irwsoy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNS1N-0002AL-3I for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 14:02:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNS1L-00027Q-NJ for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 14:02:53 -0400 Received: from plane.gmane.org ([80.91.229.3]:59838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNS1L-00027E-HW for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 14:02:51 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UNS1i-0008Iq-DO for emacs-orgmode@gnu.org; Wed, 03 Apr 2013 20:03:14 +0200 Received: from pd9eb50b4.dip.t-dialin.net ([217.235.80.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Apr 2013 20:03:14 +0200 Received: from Stromeko by pd9eb50b4.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Apr 2013 20:03:14 +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@gnu.org Eric Schulte writes: > 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. I'd lobby for integration into the test framework. >> 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. Yes they are (by accident mostly as a side effect of how the table gets imported), but only for Babel languages (except elisp) that can return tables as values. I only recently implemented the necessary processing for Perl. The returned string gets interpreted as a table if it is multiline and/or has pipe symbol in it. Normally the separator should be a TAB character, but pipes work just the same (the actual interpretation is done by org-table-convert-region, which also inserts the leading "| " that Rick is complaining about). If you want to have Org interpret the table the way Rick seems to want, then the string must be a valid Org table that should be cycled after insertion (type "org" or "wrap"). I think the only thing still missing is interpreting "^[ \t]*|-" as hline. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds