On Tuesday, November 5, 2013 12:24:44 PM HKT, James Harkins wrote:
On Nov 4, 2013 10:08 PM, "Eric Schulte" <schulte.e...@gmail.com> 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