lilypond-user
[Top][All Lists]

## How to compile Lilypond files using Emacs?

 From: Parviz Farnia Subject: How to compile Lilypond files using Emacs? Date: Sun, 26 Jul 2020 16:54:31 +0200

Hello,

I would like to ask a question about using Lilypond with Emacs. According to the online documentation it is possible to use Lilypond with Emacs:

The problem is that I cannot get it to work and I would appreciate if you could kindly give me a hand.

My working environment:
• OS: Windows 10 (64 bits)
• Lilypond version: 2.20.0-1
• Emacs version: 23.3 (64 bits)
In Lilypond installation directory I found the following files:
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-font-lock.el
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-indent.el
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-init.el
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-mode.el
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-song.el
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-what-beat.el
• D:\MyPrograms\LilyPond-2.20.0-1\usr\share\emacs\site-lisp\lilypond-words.el

What I did, was to copy all of these files in the following directory

This the directory in my .emacs.d configuration directory where I put all .el scripts that are to be read and loaded by Emacs.

Once a Lilypond file (.ly) has been opened in Emacs, I run the following commands respectively in order to enable Lilypond in Emacs:
• M-x lilypond-mode
This gives me the syntax coloring, but that's all, and when I try to compile the file by doing "C-c C-b" (Lilypond-command-buffer) I get the following error message:

-*- mode: compilation; default-directory: "c:/Users/MyUserName/AppData/Local/Temp/" -*-
Compilation started at Sun Jul 26 16:07:03

The filename, directory name, or volume label syntax is incorrect.

Compilation exited abnormally with code 1 at Sun Jul 26 16:07:03

However if I open a Windows command line (cmd.exe) and I copy/paste from the above, the following line from Emacs compilation buffer: