Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Args for sb-ext:run-program

Can someone tell me exactly what the args argument should look like for sb-ext:run-program?

If I do this:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               "C:/lispbox-0.7/opus.mid")

I get this error:

debugger invoked on a TYPE-ERROR:
  The value "C:/lispbox-0.7/opus.mid" is not of type LIST.

However, if I do this:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:\lispbox-0.7\opus.mid"))

iTunes opens, but the MIDI file doesn't play, even though this invocation from the Windows command prompt works just fine:

U:\>"C:\Program Files\iTunes\iTunes.exe" C:\lispbox-0.7\opus.mid

Note that this (with forward slashes):

CL-USER> (sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:/lispbox-0.7/opus.mid"))

has the same effect: iTunes opens, but the file is not played.

like image 355
Paul Reiners Avatar asked May 01 '26 10:05

Paul Reiners


1 Answers

In the list version you're using single backslashes, which get parsed as escape sequences. You need to use double backslashes.

like image 137
sepp2k Avatar answered May 04 '26 14:05

sepp2k



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!