Args for sb-ext: run-program

Can someone tell me 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 does not play, although this call from the Windows command line works very well:

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

Note that this (with a slash):

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 does not play.

+3
source share
1 answer

In the list version, you use single backslashes, which are parsed as escape sequences. You need to use double backslash.

+2
source

Source: https://habr.com/ru/post/1772659/


All Articles