From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Re: Fwd: ob-lilypond: pre- and post-processing of source blocks Date: Tue, 05 Nov 2013 13:35:53 +0800 Message-ID: <4ac0f0a7-7947-4d64-837e-53898ee47f32@dewdrop-world.net> References: <0dabc937-df1c-4b65-971b-f83812526af4@dewdrop-world.net> <87r4aws1w1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdZJA-0004sE-Tp for Emacs-orgmode@gnu.org; Tue, 05 Nov 2013 00:36:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdZJ5-0007as-3I for Emacs-orgmode@gnu.org; Tue, 05 Nov 2013 00:36:08 -0500 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:60028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdZJ4-0007Zp-Rp for Emacs-orgmode@gnu.org; Tue, 05 Nov 2013 00:36:03 -0500 Received: by mail-pa0-f45.google.com with SMTP id kp14so8030290pab.32 for ; Mon, 04 Nov 2013 21:36:01 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs-orgmode@gnu.org Cc: Eric Schulte On Tuesday, November 5, 2013 12:24:44 PM HKT, James Harkins wrote: > On Nov 4, 2013 10:08 PM, "Eric Schulte" 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=20 around > to that. > > In the meantime, I was just advised that lilypond has a command-line=20 switch > "-dpreview" that should eliminate the need to run "convert -trim." I'll=20 try > that first. I have managed to get this working, by adding this to .emacs=20 (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=20 for commandline switches. If there is one, it was not obvious at [1] which=20= one it should be. Then, this actually compiles and displays well enough: #+name: pitches #+begin_src lilypond -i :exports both :file pitches.png :prologue=20 \header{tagline=3D##f} \include "english.ly" { c' e' g' fs' a' c'' ef'' d' } #+end_src Next up: I would like ":prologue \header{tagline=3D##f}" to be buffer wide. I= =20 tried this: #+PROPERTY: header-args:lilypond :prologue \header{tagline=3D##f} .. but it didn't work at first. [5 minutes] OK, I had to refresh the buffer setup. That wasn't obvious in the=20 documentation. So it all seems to be working now. hjh [1]=20 http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-argu= ments