Robert Dodier wrote:
> On 7/8/07, sen1 at math.msu.edu <sen1 at math.msu.edu> wrote:
>
>>> (defun $openw (file)
>>> (open
>>> (l-string file)
>>> :direction :output
>>> :if-exists :supersede
>>> :if-does-not-exist :create))
>
>> %i3) build_info();
>>
>> Maxima version: 5.12.0
>> Maxima build date: 23:16 5/28/2007
>> host type: i686-pc-linux-gnu
>> lisp-implementation-type: CMU Common Lisp
>> lisp-implementation-version: 19c Fedora Extras release 7.fc6 (19C)
>
> Hmm. I can't tell what's going on here. You might have to
> take it up with the CMUCL developers. It seems strange that
> (open foo :direction :output :if-exists :supersede :if-does-not-exist :create)
> should cause CMUCL to complain. Maybe you can try it with
> another Lisp implementation.
I checked version 19c (on Solaris), and (open "foo" ...) works just fine
even when "foo" already exists.
Something else is going on. Can you run "maxima -g" and when the error
is encountered, you should be in the debugger. Then type "back" to get
a backtrace so I can see what's happening.
Also note that cmucl supports a type of versioning for files, using
Emacs-style file versions like foo~1~, foo~2~ and so on. I've forgotten
how to enable that, though. You might have to modify openw to to make
this work. Perhaps (open "foo" :if-exists :new-version)?
Ray