From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Personal accounting with emacs, org and...? Date: Thu, 22 Jul 2010 13:43:00 -0700 Message-ID: <877hkndz8r.fsf@gmail.com> References: <20100722062629.GK14200@thinkpad.adamsinfoserv.com> <877hknlwbb.wl%ucecesf@ucl.ac.uk> <878w53fnu1.fsf@gmail.com> <87mxtjw985.wl%ucecesf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=48355 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oc2fO-0006nX-NS for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 16:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oc2fN-0008Ie-88 for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 16:46:54 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:33921) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oc2fN-0008IP-2B for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 16:46:53 -0400 Received: by pzk33 with SMTP id 33so6439086pzk.0 for ; Thu, 22 Jul 2010 13:46:52 -0700 (PDT) In-Reply-To: <87mxtjw985.wl%ucecesf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 22 Jul 2010 21:30:02 +0100") 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: Eric S Fraga Cc: emacs-orgmode@gnu.org Eric S Fraga writes: > On Thu, 22 Jul 2010 10:06:30 -0700, "Eric Schulte" wrote: [...] >> >> Tangling does not require *any* language specific support. Since the >> integration of Babel into Org-mode any type of code block should tangle >> just fine. For example the following minimal org file tangles a code >> block of the fictional /schulte/ language to a file "eric.sh" > > Yes, thanks, I figured this out on the way home (the advantage of a > long commute is time to play!) before I got your email. The tangling > works like a charm. What's even better is that ability to specify the > tangle property as an org property which only affects code blocks > within a certain heading! Fantastic. > Great to hear. > >> It does look like there is fertile ground for Babel<->Ledger >> integration. > > Attached is my simple, linux only, org-babel solution and an example > org file which uses it. Note, I've still not had a chance to look at > the ob-template in Worg so I'm sure my ob-ledger file could be > improved... > After a quick scan your ob-ledger.el file looks great. I wouldn't feel obligated to add all of the functionality listed in the template. Many of our language files (e.g. dot, sass, etc...) are very simple. I think one of the big wins of our new setup is that language support can be added in very small increments (e.g. [1]). Please do let me know when you think this is stable enough for inclusion into Org-mode. Cheers -- Eric > > Thanks again all those who have contributed to babel! > > eric > Footnotes: [1] as a mostly unrelated sidebar I've recently started using the following 4-line function in place of an ob-javascript.el, for embedding javascript in exported html --8<---------------cut here---------------start------------->8--- # Allow for exportation of JS code blocks into html #+begin_src emacs-lisp :results silent :exports none ;; just to let us export the js directly into html (defun org-babel-execute:js (body params) (format "\n" body)) #+end_src --8<---------------cut here---------------end--------------->8--- Which allows js blocks in an org-mode document like the following to be exported using the appropriate HTML script tags. --8<---------------cut here---------------start------------->8--- # play with the url of my homepage -- HTML5 #+begin_src js :results html :exports results var delay = 150; var index = 0; var word = "eschulte/"; var forward = true; function withTlda(str, ind){ return str.slice(0,ind)+"~"+str.slice(ind,str.length)} function step(){ window.history.replaceState("", "", "/"+withTlda(word, index)); if(forward) index++; else index--; if(index == (word.length-1) || index == 0) forward = !forward; if(forward && index == 1) setTimeout('step()', Math.floor(Math.random()*20000)); else setTimeout('step()', delay);} step(); #+end_src --8<---------------cut here---------------end--------------->8---