From 1929b8082b9cff2a4bd99c573b2a2bd50b76b184 Mon Sep 17 00:00:00 2001 From: Jonathan Gregory Date: Mon, 30 Aug 2021 13:49:48 -0300 Subject: [PATCH] Set the MIDI file extension conditionally * lisp/ob-lilypond.el (org-babel-lilypond-attempt-to-play-midi): By default, LilyPond outputs .mid files for Windows and .midi for everything else. See: TINYCHANGE --- lisp/ob-lilypond.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index eae1779ce..e197ea7a6 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -337,7 +337,9 @@ If TEST is non-nil, the shell command is returned and is not run." FILE-NAME is full path to lilypond file. If TEST is non-nil, the shell command is returned and is not run." (when org-babel-lilypond-play-midi-post-tangle - (let ((midi-file (org-babel-lilypond-switch-extension file-name ".midi"))) + (let* ((ext (if (eq system-type 'windows-nt) + ".mid" ".midi")) + (midi-file (org-babel-lilypond-switch-extension file-name ext))) (if (file-exists-p midi-file) (let ((cmd-string (concat org-babel-lilypond-midi-command " " midi-file))) -- 2.25.1