On 2010-12-12 10:07, Alexander Kobel wrote:
On 2010-12-12 09:48, James Bailey wrote:

How can I pass an argument to the emacs compile command? [...]

Hi, James,

C-h v LilyPond-command-alist gives me this:  [...]

Value:
(("LilyPond" "Lilypond %s" "%s" "%l" "View")
[...])

Uh, I forgot to mention that I have the following in my ~/.emacs (always assuming you also use some Linux or MacOS X; I have no clue about the windows configuration):

(setq LilyPond-lilypond-command "Lilypond")

The default should be "lilypond" instead of "Lilypond" - the latter links to the current git compilation on my machine. I'm not sure whether it suffices to just say
  (setq LilyPond-lilypond-command "Lilypond <your-options>")
in your Emacs configuration file or if you really have to tweak the whole LilyPond-command-alist; but I hope this will give you enough hints.


Actually, thinking about it a little bit more: I recommend you build yourself a wrapper like the following for lily s.t. you can call the same commands both in Emacs and in the shell. (This is the essentials of my ~/bin/Lilypond shell script; use chmod a+x after writing it. Then, the above (setq ...) command does the right thing.)

#!/bin/sh
LILYPOND=$HOME/build/lilypond/release/out/bin/lilypond
LILYPOND_OPTIONS="--relocate"
exec $LILYPOND "$LILYPOND_OPTIONS" "$@"

Here, $@ forwards all command-line arguments to the actual program. $LILYPOND should point to your local binary (default: /usr/bin/lilypond), and $LILYPOND_OPTIONS should contain all the options you want to specify. "--relocate" is only necessary for out-of-source builds, when the default directory for all the Scheme and .ly files is not used.


HTH,
Alexander

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to