[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Personal accounting with emacs, org and...?
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Personal accounting with emacs, org and...? |
Date: |
Thu, 22 Jul 2010 13:43:00 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Eric S Fraga <address@hidden> writes:
> On Thu, 22 Jul 2010 10:06:30 -0700, "Eric Schulte" <address@hidden> 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 "<script type=\"text/javascript\">
<!--/*--><![CDATA[/*><!--*/\n%s\n/*]]>*///-->
</script>\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---
- [Orgmode] Personal accounting with emacs, org and...?, Marcelo de Moraes Serpa, 2010/07/22
- Re: [Orgmode] Personal accounting with emacs, org and...?, Russell Adams, 2010/07/22
- [Orgmode] Re: Personal accounting with emacs, org and...?, Gour, 2010/07/22
- Re: [Orgmode] Personal accounting with emacs, org and...?, Eric S Fraga, 2010/07/22
- Re: [Orgmode] Personal accounting with emacs, org and...?, Eric Schulte, 2010/07/22
- Re: [Orgmode] Personal accounting with emacs, org and...?, Eric S Fraga, 2010/07/22
- Re: [Orgmode] Personal accounting with emacs, org and...?,
Eric Schulte <=
- Re: [Orgmode] Personal accounting with emacs, org and...?, Eric S Fraga, 2010/07/22
- Re: [Orgmode] Personal accounting with emacs, org and...?, Eric Schulte, 2010/07/23
- Re: [Orgmode] Personal accounting with emacs, org and...?, Eric S Fraga, 2010/07/24
[Orgmode] Re: Personal accounting with emacs, org and...?, Matt Lundin, 2010/07/22