From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [babel] Collection of code block snippets Date: Tue, 6 Sep 2011 10:26:29 +0200 Message-ID: References: <878vq48dvt.fsf@gmail.com> <87zkiiq4ko.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3005dc3899935b04ac4195e8 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0qzI-0004Wr-25 for emacs-orgmode@gnu.org; Tue, 06 Sep 2011 04:26:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0qzG-0006cl-CX for emacs-orgmode@gnu.org; Tue, 06 Sep 2011 04:26:32 -0400 Received: from mail-qy0-f176.google.com ([209.85.216.176]:63641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0qzG-0006ch-6u for emacs-orgmode@gnu.org; Tue, 06 Sep 2011 04:26:30 -0400 Received: by qyl16 with SMTP id 16so3650890qyl.0 for ; Tue, 06 Sep 2011 01:26:29 -0700 (PDT) In-Reply-To: <87zkiiq4ko.fsf@gmail.com> 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: Eric Schulte Cc: Org Mode --20cf3005dc3899935b04ac4195e8 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 5, 2011 at 6:54 PM, Eric Schulte wrote: > Hi Rainer, > > > Just as a sideline: would it be possible, to use this file to test babel > (on > > a high level)?, i.e. collect all results and compare them with previous > sets > > of results? > > > > Two problems I see with running these examples in a single large block > > 1. I'm not sure how to collect all of the results, both of the two > options that occur to me > - mapping over each example and evaluating the first code block or > Probably would be the better solution, and also just skip tests for which the languages are not installed. > - exporting to some backend and checking the resulting export file > would either leave out some results or possibly be very brittle to > small changes (e.g., changes in the exporter backend) > This might be actually be an advantage - if changes are detected, the exported file can be evaluated visually and added to the "aceptable results", either generally or for a user. > > 2. executing the whole set would require a wide range of languages be > installed on the users system many of which most people would never > use > Point taken - I haven't considered that. > > > > > Especially, as this file is high-level and contains a whole range of > > "examples for the real world", I think that might be useful. It would > > definitely not be usable t pinpoint errors, but at identify unintended > side > > effects. > > I do agree that this collection holds great promise as fodder for Babel > unit tests (unit tests which are sorely needed). Each example could be > wrapped in an ert test method and then one-by-one copied over into the > Org-mode test suite. This should be a fairly easy way to greatly > increase Babel's test suite coverage -- and most importantly it would be > explicitly testing topics that have arisen previously on the mailing > list so are of importance to users. > Exactly. > > > And if this could be done by the user to test .emacs configuration > > settings, that would be really great. > > > > That's a good idea. Simply running the Org-mode test suite is a good > way for users to test the sanity of their local config. > Yes - I have a few times run into problems due to my configuration file and only realized it later - if there would be ab org file which I could use to test easily my configuration directly after making the changes, life would have been much easier for me. This would also be useful for questions on the mailing list and for a kind of "quality control" for published configs on the web. > Best -- Eric > Cheers, Rainer > > > > > Thanks, > > > > Rainer > > > > > > > >> > >> Hope this is useful and or fun, I will continue to update it as the > >> scraps.org file grows. > >> > >> Cheers -- Eric > >> > >> -- > >> Eric Schulte > >> http://cs.unm.edu/~eschulte/ > >> > >> > > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --20cf3005dc3899935b04ac4195e8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Sep 5, 2011 at 6:54 PM, Eric Sch= ulte <schult= e.eric@gmail.com> wrote:
Hi Rainer,

> Just as a sideline: would it be possible, to use this file to test bab= el (on
> a high level)?, i.e. collect all results and compare them with previou= s sets
> of results?
>

Two problems I see with running these examples in a single large bloc= k

1. I'm not sure how to collect all of the results, both of the two
=A0 options that occur to me
=A0 - mapping over each example and evaluating the first code block or
=

Probably would be the better solution, and= also just skip tests for which the languages are not installed.
=A0
=A0 - exporting to some backend and checking the resulting export file
=A0 would either leave out some results or possibly be very brittle to
=A0 small changes (e.g., changes in the exporter backend)
=

This might be actually be an advantage - if changes are= detected, the exported file can be evaluated visually and added to the &qu= ot;aceptable results", either generally or for a user.
=A0

2. executing the whole set would require a wide range of languages be
=A0 installed on the users system many of which most people would never =A0 use

Point taken - I haven't co= nsidered that.
=A0

>
> Especially, as this file is high-level and contains a whole range of > "examples for the real world", I think that might be useful.= It would
> definitely not be usable t pinpoint errors, but at identify unintended= side
> effects.

I do agree that this collection holds great promise as fodder for Bab= el
unit tests (unit tests which are sorely needed). =A0Each example could be wrapped in an ert test method and then one-by-one copied over into the
Org-mode test suite. =A0This should be a fairly easy way to greatly
increase Babel's test suite coverage -- and most importantly it would b= e
explicitly testing topics that have arisen previously on the mailing
list so are of importance to users.

Exa= ctly.
=A0

> And if this could be done by the user to test .emacs configuration
> settings, that would be really great.
>

That's a good idea. =A0Simply running the Org-mode test suite is = a good
way for users to test the sanity of their local config.

Yes - I have a few times run into problems due to my confi= guration file and only realized it later - if there would be ab org file wh= ich I could use to test easily my configuration directly after making the c= hanges, life would have been much easier for me. This would also be useful = for questions on the mailing list and for a kind of "quality control&q= uot; for published configs on the web.


Best -- Eric

Cheers,

Rainer=A0

>
> Thanks,
>
> Rainer
>
>
>
>>
>> Hope this is useful and or fun, I will continue to update it as th= e
>> scraps.org fil= e grows.
>>
>> Cheers -- Eric
>>
>> --
>> Eric Schulte
>> http://= cs.unm.edu/~eschulte/
>>
>>

--
Eric Schulte
http://cs.unm.ed= u/~eschulte/



--
= Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biolo= gy
Stellenbosch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9= 53 10 27 44
Cell: =A0 =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 = =A0 =A0 +33 - (0)9 58 10 27 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 2= 2 44

email: =A0 =A0 =A0Rainer@krugs.de

Skype: =A0 =A0 =A0RMkrug

--20cf3005dc3899935b04ac4195e8--