From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Wagner Subject: [babel]: Some feedback after the first week usage Date: Thu, 5 Nov 2009 17:27:44 +0900 Message-ID: <200911051727.44814.torsten.wagner@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5xhG-0004c0-AQ for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 03:27:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5xhB-0004ah-Tz for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 03:27:58 -0500 Received: from [199.232.76.173] (port=50047 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5xhB-0004ac-Gt for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 03:27:53 -0500 Received: from mail-yw0-f194.google.com ([209.85.211.194]:63504) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5xhB-00064z-2m for emacs-orgmode@gnu.org; Thu, 05 Nov 2009 03:27:53 -0500 Received: by ywh32 with SMTP id 32so7591090ywh.14 for ; Thu, 05 Nov 2009 00:27:52 -0800 (PST) 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: Org Mode Mailing List 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