From: "Eric Schulte" <schulte.eric@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: Personal accounting with emacs, org and...?
Date: Thu, 22 Jul 2010 13:43:00 -0700 [thread overview]
Message-ID: <877hkndz8r.fsf@gmail.com> (raw)
In-Reply-To: <87mxtjw985.wl%ucecesf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 22 Jul 2010 21:30:02 +0100")
Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> On Thu, 22 Jul 2010 10:06:30 -0700, "Eric Schulte" <schulte.eric@gmail.com> 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---
next prev parent reply other threads:[~2010-07-22 20:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 6:20 Personal accounting with emacs, org and...? Marcelo de Moraes Serpa
2010-07-22 6:26 ` Russell Adams
2010-07-22 6:39 ` Gour
2010-07-22 6:46 ` Russell Adams
2010-07-22 9:06 ` Eric S Fraga
2010-07-22 17:06 ` Eric Schulte
2010-07-22 20:30 ` Eric S Fraga
2010-07-22 20:43 ` Eric Schulte [this message]
2010-07-22 22:49 ` Eric S Fraga
2010-07-23 16:29 ` Eric Schulte
2010-07-24 23:01 ` Eric S Fraga
2010-07-22 13:53 ` Matt Lundin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877hkndz8r.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=e.fraga@ucl.ac.uk \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.