emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Fwd: ob-lilypond: pre- and post-processing of source blocks


From: James Harkins
Subject: Re: [O] Fwd: ob-lilypond: pre- and post-processing of source blocks
Date: Tue, 05 Nov 2013 13:35:53 +0800
User-agent: Trojita/v0.3.96-git; Qt/4.8.1; X11; Linux; Ubuntu 12.04.3 LTS

On Tuesday, November 5, 2013 12:24:44 PM HKT, James Harkins wrote:
On Nov 4, 2013 10:08 PM, "Eric Schulte" <address@hidden> wrote:
Look in lisp/ob-lilypond.el.  Specifically (1) would be done in
`org-babel-expand-body:lilypond', and both (2) and (3) in
`org-babel-execute:lilypond'.

Thanks. I'm not much of a LISPer so I have no idea when I might get
around
to that.

In the meantime, I was just advised that lilypond has a command-line
switch
"-dpreview" that should eliminate the need to run "convert -trim." I'll
try
that first.

I have managed to get this working, by adding this to .emacs (unfortunately, this is not exposed as a defcustom).

(setq ly-nix-ly-path "/usr/bin/lilypond -dpreview")

Incidentally, it would be very useful if babel offered a header argument for commandline switches. If there is one, it was not obvious at [1] which one it should be.

Then, this actually compiles and displays well enough:

#+name: pitches
#+begin_src lilypond -i :exports both :file pitches.png :prologue \header{tagline=##f}
\include "english.ly"
{ c' e' g' fs' a' c'' ef'' d' }
#+end_src

Next up: I would like ":prologue \header{tagline=##f}" to be buffer wide. I tried this:

#+PROPERTY: header-args:lilypond :prologue \header{tagline=##f}

.. but it didn't work at first.

[5 minutes]

OK, I had to refresh the buffer setup. That wasn't obvious in the documentation.

So it all seems to be working now.

hjh

[1] http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-arguments




reply via email to

[Prev in Thread] Current Thread [Next in Thread]