emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Torsten Wagner <torsten.wagner@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: [babel]: Some feedback after the first week usage
Date: Thu, 5 Nov 2009 17:27:44 +0900	[thread overview]
Message-ID: <200911051727.44814.torsten.wagner@googlemail.com> (raw)

Hi everyone,
I would like to report the usage of org-babel after a 1 week usage in 
"serious" project work. 

First of all org-babel is a masterpiece. Many thanks to the developers. I 
never saw a project which was such useful in this very early stage (how old is 
org-babel?). For me it tends out that org-babel is for my scientific-
programming tasks what org-mode is for organisation of the administrative part 
of those projects... plain, simple and just helpful at the right moment.

I like to make some remarks and depict some small glitches which I found over 
the last week. As for the glitches, for some there might be a solution 
already, maybe some arouses because I'm still using something wrong. Thus, I 
thought it might be good to share it here.  

First another statement which could be help to show how useful is org-babel.

Do you spend  sometimes days or weeks in front of the PC to fiddle around with 
some scientific simulation or some other programming task?
If your colleagues and esp. your boss are not deep inside what it means to 
perform this kind of work (e.g., because they might be from another, 
programming free, major), they pretty fast become nervous about why you are 
going to loose so much time in front of the keyboard. 

With org-babel and a mixture of literate programming and RR, you will have a 
new way to handle those requests.   
Actually all you need is 
C-c C-e d
and sent it to the printer....
The result will be a professional looking comprehensive status report. You can 
bring it to the meetings, file them as lab-book, use them in many ways to show 
what are you doing right at the moment. It includes everything from theory, 
explanations, calculations up to graphs, tables  and even the source code.  
And all you need is the above command which takes 1.2 seconds... :D

Compare this with the "classical" approach (which is teached unfortunately in 
most universities now). Bring your project to a point where all individual 
parts work, create some figures, data and results of your project, create a new 
MS Power-point presentation, copy and place figures and results inside, add 
text and tables, make everything looks more or less uniform, print it.... this 
might consume 1-2 days or ... 172800 seconds !!! and you will still miss many 
information (e.g. which fitting function did you use for the graph ?).


As I said already, I'm really amazed that org-babel works all out so smoothly. 
However, I noticed the following points which I like to publish here for 
discussion.

1. Is there another possible way for creating the final statement for the 
source block result ? 
At the moment I have to write 

#+srcname: plot()
#+begin_src python :results file 
  plot(x,y)
  filename = "figure.pdf"
  savefig(filename)
  filename
#+end_src

#+resname: [[figure.pdf]]

But from the python point of view the last command is not necessary. If I 
tangle the source blocks or copy and paste them I might even become some 
problems (e.g., if the content is a very large string it would be displayed on 
the ipython console). In addition this commands will be included in the export 
but have not really a function beside of the wrapping for org-babel. I would 
like to use something like this: 

#+srcname: sin_sum()
#+begin_src python :results file 
  plot(x,y)
  filename = "figure.pdf"
  savefig(filename)
#+end_src filename

#+resname: [[figure.pdf]]

By this way I could clearly distinguish between what is pure python and what 
is needed to wrap it in org-mode

2. Is it possible (by a keyboard-shortcut) to execute all blocks of a session 
starting from top to down? Sometimes I make small changes here and there and I 
just like to say o.k. tangle all this together and execute it, refresh and 
show me all new results. This might be even combined by a org-mode variable 
which allow to define which results need to be refreshed before saving the org-
mode file (something like #+EXECBYSAVE: name_of_session).
I press C-x C-s rather frequently without much thinking of it. If I want make 
sure that e.g., all generated output files (e.g. figures) are in sync with the 
code it would be nice to say C-x C-s  and all external figures will be 
recreated if necessary.
 
3. If somethings went bad during execution of a block, org-babel will report 
"no output"... is there any way to catch errors and place a warning or/and 
even jump to the code block in question?

4. Is there a way to see all source code blocks of a single session tangled 
together in a single buffer and changes in this buffer will be placed back after 
leaving into the individual blocks again 
Similar like C-c ' just for a complete session with minimal comments to split 
it later:
e.g.,

#[[blockname1]]
a= 1
b= 2
#[[blockname2]]
result = a +b

would allow me to work on the code in a single file in python mode and later it 
will be displayed again in the individual source blocks in my org-file.

I guess that was all I noticed during using org-bable over the last days.
It would be nice to hear how others think about the above points. Did you find 
a better solution already ? Any tricks or any functions I might missing?
Again many thanks for this really nice org-mode contribution.


Best regards

Torsten
 

             reply	other threads:[~2009-11-05  8:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05  8:27 Torsten Wagner [this message]
2009-11-05 15:57 ` [babel]: Some feedback after the first week usage Thomas S. Dye
2009-11-06  1:34   ` Torsten Wagner
2009-11-05 17:27 ` Dan Davison
2009-11-05 22:48   ` Tom Short
2009-11-06 18:56   ` Thomas S. Dye
2009-11-06  0:02 ` Eric Schulte

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=200911051727.44814.torsten.wagner@googlemail.com \
    --to=torsten.wagner@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).