From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Fwd: [RFC] Self-configuring Org-mode files Date: Sat, 11 Dec 2010 17:49:02 -1000 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1480696143==" Return-path: Received: from [140.186.70.92] (port=46379 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRcvt-0005tL-TG for emacs-orgmode@gnu.org; Sat, 11 Dec 2010 22:49:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PRcvs-0007sP-21 for emacs-orgmode@gnu.org; Sat, 11 Dec 2010 22:49:09 -0500 Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:51338) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PRcvr-0007s4-NH for emacs-orgmode@gnu.org; Sat, 11 Dec 2010 22:49:08 -0500 Received: from cpe-66-91-68-127.hawaii.res.rr.com ([66.91.68.127] helo=[192.168.1.2]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1PRcvp-0008HR-45 for emacs-orgmode@gnu.org; Sat, 11 Dec 2010 20:49:05 -0700 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode ml --===============1480696143== Content-Type: multipart/alternative; boundary=Apple-Mail-8-285930556 --Apple-Mail-8-285930556 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Forwarding off-list replies from Stephen Eglen, most recent at the top. > One caveat of course with the idea: what software other than emacs > should be assumed to be available? e.g. if someone has some R code in > the doc, you'll need R on the system, likewise, perl, python. (I > considered whether it was worth setting up a system for processing > Sweave documents -- but a colleague pointed out that unless you can > preload R with most of the popular R packages that are likely to be > needed in a Sweave document, some form of intervention/curation is > always needed.) Begin forwarded message: > From: Stephen Eglen > Date: December 11, 2010 7:18:26 AM HST > To: "Thomas S. Dye" > Cc: S.J.Eglen@damtp.cam.ac.uk > Subject: Re: [RFC] Self-configuring Org-mode files > > Hi Tom, > > I think you have hit the nail on the head -- it took me ages to get > org > up and running with all the extra config to generate a beamer doc. > part > of the trouble in that case was that i was following emails that > were a > year old, but still I think the problem you outline is clear. As to > the > solution, your ideas sound sensible. > > To add one extra suggestion: how about a web-service of some sort > where > you upload your .org file, and it returns the 'output' (e.g. pdf doc) > produced by a native Emacs 23.X session running a stable version of > org > with zero extra configuration? I realise that it may be a lot of work > to produce such a web service and expensive to maintain, but those > issues aside, having a "vanilla" system to test RR org documents on > would > be great. > > best wishes, Stephen > > "Thomas S. Dye" writes: > >> Aloha all, >> >> I'm eager to learn how to build a self-configuring Org-mode file. >> >> I think Org-mode is uniquely positioned to produce reproducible >> research >> documents, but frankly speaking, the author of a reproducible Org- >> mode >> research document would be foolish to release it. The probability >> that it >> would run out-of-the-box on a reader's computer is quite a bit less >> than 1. >> Multiply this fraction by the number of potential readers and the >> probability >> that the author will receive one or more emails entitled something >> like "Your >> reproducible research isn't reproducible" rapidly approaches 1. >> >> A desire to produce reproducible research with Org-mode shouldn't >> reduce to an >> open-ended commitment to solve configuration problems on users' >> computers >> around the world. An Org-mode file that reliably self-configures >> might solve >> this problem. >> >> Based on the kind comments of several list members, I've come up >> with what I >> hope are the rudiments of such a self-configuring Org-mode file. I'm >> requesting your comments because I believe, individually and >> collectively, you >> know way more about this than I do. >> >> 1) At the end of the Org-mode file are some instructions saying >> something like >> "To use this document, first >> evaluate this code block", as suggested by Dan Davison: >> >> # Local variables: >> # eval:(sbe "essential-document-config") >> # End: >> >> 2) the source code block "essential-document-config" would consist >> of noweb >> calls to Library of Babel functions: >> >> #+source: essential-document-config >> #+begin_src emacs-lisp :noweb yes >> <> >> <> >> #+end_src >> >> 3) The Library of Babel would be >> populated with little functions, each of which sets a single >> variable in a buffer-local way >> (as suggested several times to me on the list): >> >> #+source: lob-set-this-variable >> #+begin_src emacs-lisp :var x=nil >> (set (make-local-variable 'this-variable) x) >> #+end_src >> >> 4) A super-function in the Library of Babel would set the buffer- >> local >> instance of every relevant Org-mode variable to its default state: >> >> #+source: lob-set-local-defaults >> #+begin_src emacs-lisp >> ... >> #+end_src >> >> 5) >> The Org-mode community would be responsible for populating the >> Library of Babel with the relevant little functions--whenever a new >> configuration variable is introduced, then a little function for it >> would be deposited in the Library of Babel. >> The name of the configuration function would be part of the >> variable's >> docstring. >> >> 6) The author of a reproducible Org-mode document could reasonably >> expect to >> produce a document that self-configures on computers around the >> world, in a >> way that is safe and effective. The author would call the super- >> function, >> then add noweb calls to little functions until the reproducible >> research >> document works as expected. >> >> I'm happy for any comments, positive or negative. >> >> All the best, >> Tom >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-8-285930556 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Forwarding off-list replies = from Stephen Eglen, most recent at the = top.
 

One caveat = of course with the idea: what software other than emacs
should be = assumed to be available? e.g. if someone has some R code in
the doc, = you'll need R on the system, likewise, perl, python. =  (I
considered whether it was worth setting up a system for = processing
Sweave documents -- but a colleague pointed out that = unless you can
preload R with most of the popular R packages that are = likely to be
needed in a Sweave document, some form of = intervention/curation is
always = needed.)

Begin forwarded message:

From: = Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>= ;
Date: December 11, 2010 7:18:26 AM = HST
To: "Thomas S. Dye" <tsd@tsdye.com>
Subject: Re: [RFC] Self-configuring Org-mode = files

=
Hi Tom,

I think you have hit the nail on the head -- = it took me ages to get org
up and running with all the extra config = to generate a beamer doc.  part
of the trouble in that case was = that i was following emails that were a
year old, but still I think = the problem you outline is clear.  As to the
solution, your = ideas sound sensible.  

To add one extra suggestion: how = about a web-service of some sort where
you upload your .org file, and = it returns the 'output' (e.g. pdf doc)
produced by a native Emacs = 23.X session running a stable version of org
with zero extra = configuration?  I realise that it may be a lot of work
to = produce such a web service and expensive to maintain, but = those
issues aside, having a "vanilla" system to test RR org = documents on would
be great.

best wishes, = Stephen

"Thomas S. Dye" <tsd@tsdye.com> = writes:

Aloha = all,

I'm eager to = learn how to build a self-configuring Org-mode file. =  

I think = Org-mode is uniquely positioned to produce reproducible = research
documents, but = frankly speaking, the author of a reproducible = Org-mode
research document = would be foolish to release it.   The probability that = it
would run out-of-the-box on = a reader's computer is quite a bit less than = 1.
Multiply this fraction by = the number of potential readers and the = probability
that the author = will receive one or more emails entitled something like = "Your
reproducible research = isn't reproducible" rapidly approaches 1. =  

A desire to = produce reproducible research with Org-mode shouldn't reduce to = an
open-ended commitment to = solve configuration problems on users' = computers
around the world. =  An Org-mode file that reliably self-configures might = solve
this = problem.

Based on the = kind comments of several list members, I've come up with what = I
hope are the rudiments of = such a self-configuring Org-mode file. =  I'm
requesting your = comments because I believe, individually and collectively, = you
know way more about this = than I do.

1) At the end = of the Org-mode file are some instructions saying something = like
"To use this document, = first
evaluate this code = block", as suggested by Dan Davison:

# Local = variables:
# eval:(sbe = "essential-document-config")
# = End:

2) the source = code block "essential-document-config" would consist of = noweb
calls to Library of = Babel functions:

#+source: = essential-document-config
#+begin_src emacs-lisp :noweb = yes
= <<lob-set-this-variable(x=3Dt)>>
<<lob-set-that-variable(x=3Dnil)>>
#+end_src

3) The Library = of Babel would be
populated = with little functions, each of which sets a single variable in a = buffer-local way
(as = suggested several times to me on the list):

#+source: = lob-set-this-variable
#+begin_src emacs-lisp :var = x=3Dnil
(set = (make-local-variable 'this-variable) x)
#+end_src

4) A = super-function in the Library of Babel would set the = buffer-local
instance of every = relevant Org-mode variable to its default = state:

#+source: = lob-set-local-defaults
#+begin_src emacs-lisp
...
#+end_src

5)
The Org-mode = community would be responsible for populating the Library of Babel with = the relevant little functions--whenever a new configuration variable is = introduced, then a little function for it would be deposited in the = Library of Babel.
The name of = the configuration function would be part of the = variable's
docstring.

6) The author = of a reproducible Org-mode document could reasonably expect = to
produce a document that = self-configures on computers around the world, in = a
way that is safe and = effective.  The author would call the = super-function,
then add noweb = calls to little functions until the reproducible = research
document works as = expected.

I'm happy for = any comments, positive or negative.

All the = best,
Tom

_______________________________________________
Emacs-orgmode mailing = list
Please use `Reply All' to = send replies to the list.
Emacs-orgmode@gnu.org
http://lists.= gnu.org/mailman/listinfo/emacs-orgmode

= --Apple-Mail-8-285930556-- --===============1480696143== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1480696143==--