UA-69169170-1 OSX-LilyPond-emacs | Daniel Hensel

Setups

Das folgende Schema hat für mich funktioniert, vielen Dank an Orm Finnendahl:

Installieren Sie emacs: http://emacsformacosx.com

Installieren Sie LilyPond:

http://www.lilypond.org/index.de.html

Für blutige Anfänger: Navigieren Sie Programme-Dienstprogramme-Terminal.app


Lilypond emacs-Setup OS X

Jetzt LilyPond Ihrem PATH hinzufügen:
Öffnen Sie das Terminal:

sudo touch ~/.bash_profile

Open .bash-profile in your favorite editor and fill in:
export PATH="/Applications/LilyPond.app/Contents/Resources/bin:$PATH"

Speichern:

kontrollieren Sie, ob LilyPond zum Path hinzugefügt wurde mit: echo $PATH

Nun können Sie mit dem Befehl ‚lilypond‘ dieses im Terminal öffnen. Navigieren Sie mit cd im Terminal nach:

/Applications/LilyPond.app/Contents/Resources/share/emacs/site-lisp

Copy und Paste:

sudo ln -s /Applications/LilyPond.app/Contents/Resources/share/emacs/site-lisp /Applications/Emacs.app/Contents/Resources/site-lisp

Nun müssen wir die Datei lilypond-mode.el editieren. Rechts-Klicken Sie auf die LilyPond.App auf „Paketinhalt anzeigen“ und Navigieren Sie in Contents/Resources/share/emacs/site-lisp

Öffnen Sie die Datei in lilypond-mode.el Emacs.
Tippen Sie: M-g-g
Gehen Sie zu Zeile 335 und ändern Sie „defcustom LilyPond-lilypond-command“

Fügen Sie dieses hier ein:
(defcustom LilyPond-lilypond-command "/Applications/LilyPond.app/Contents/Resources/bin/lilypond"
"Command used to compile LY files."
:group 'LilyPond
:type 'string)

Wir möchten unsere Vorschau.app für Post-Script-Files benutzen, daher ändern wir auch den folgenden Abschnitt:

(defcustom LilyPond-ps-command " /Applications/Preview.app/Contents/MacOS/Preview --watch"
"Command used to display PS files."

:group 'LilyPond
:type 'string)

Das Gleiche mit unserem PDF-Betrachter, wir wählen Safari, da Safari uns die URLs für die point and click-Funktion liefert.

(defcustom LilyPond-pdf-command "/Applications/Safari.app/Contents/MacOS/Safari“
"Command used to display PDF files."

:group 'LilyPond
:type 'string)

/* funktionieren nicht wie erwartet

Änderungen für MIDI.

(defcustom LilyPond-midi-command "open"
"Command used to play MIDI files."

Change MIDI-Player to Logic Pro X.



(defcustom LilyPond-all-midi-command "/Applications/Logic\ Pro\ X.app/Contents/MacOS/Logic\ Pro\ X -ia"
"Command used to play MIDI files."

:group 'LilyPond
:type 'string)

speichern mit M-x-s */

Auf dem Mac tippen Sie nun alt-Shift-:

schreiben Sie:
(find-file user-init-file)

Der Standard- lilypond.mode öffnet keine .ily-Dateien, deshalb müssen wir ihn manipulieren. Copy und Paste der folgenden Zeilen in ihre .emacs-Datei:

(in emacs tippen: C-y)

(setq load-path (append (list (expand-file-name"/Applications/LilyPond.app/Contents/Resources/share/emacs/site-lisp")) load-path))
(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))
(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode))
(add-to-list 'auto-mode-alist '("\\.lytex$" . LilyPond-mode))
(add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))

(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

Starten Sie emacs neu.

Sie haben es nun geschafft. Ich suche noch nach einer Lösung für die MIDI-Wiedergabe und point and click.

Wenn Sie eine LilyPond-Datei öffnen, können Sie den LilyPond-Modus in emacs schon benutzen.