Skip to content

Commit f08b4c4

Browse files
authored
Merge pull request #49 from brandflake11/main
Fixed Rendering and Playing from File with Spaces and Other Characters
2 parents 411e31b + acae108 commit f08b4c4

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

csound-mode.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"Play the csound file in current buffer."
8080
(interactive)
8181
(if csound-repl-start-server-p
82-
(compile (format "csound %s %s" csound-play-flags (buffer-file-name)))
82+
(compile (format "csound %s %s" csound-play-flags (shell-quote-argument (buffer-file-name))))
8383
(process-send-string csound-repl--udp-client-proc
8484
(buffer-substring
8585
(point-min) (point-max)))))
@@ -129,9 +129,10 @@
129129
(if csound-repl-start-server-p
130130
(compile (format "csound %s %s -o %s --format=%s %s"
131131
csound-render-flags
132-
(buffer-file-name)
133-
filename
134-
(cadr (split-string filename "\\."))
132+
(shell-quote-argument (buffer-file-name))
133+
(shell-quote-argument filename)
134+
(-> (split-string filename "\\.")
135+
cl-rest cl-first)
135136
(cl-case (string-to-number bit)
136137
(32 "-f")
137138
(24 "-3")

0 commit comments

Comments
 (0)