renaming files from within maxima



OK,
  I found that the fc7 rpm for 19d did install on my system.  I
  compiled it into maxima, and there is no difference.

Here is the output.


(%i1) build_info();

Maxima version: 5.12.0
Maxima build date: 17:5 7/10/2007
host type: i686-pc-linux-gnu
lisp-implementation-type: CMU Common Lisp
lisp-implementation-version: 19d Fedora Extras release 3.fc7 (19D)

(%o1)
(%i2) system("ls -l file");
ls: file: No such file or directory
(%o2)                      #<process 30916 :EXITED>
(%i3) s: openw("file");
(%o3)                      #<Stream for file "file">
(%i4) printf(s, "Hello");
;

; Warning: This function is undefined:
;   MLISTP
(%o4)                                false
(%i5) close(s);
(%o5)                                true
(%i6) system("ls -l file");
-rw-r--r-- 1 sen users 5 Jul 10  2007 file
(%o6)                      #<process 30918 :EXITED>
(%i7) s: openw("file");


File-error in function LISP::FD-OPEN:  Error opening #P"file", File
exists.
    [Condition of type KERNEL:SIMPLE-FILE-ERROR]

Restarts:
   0: [CONTINUE    ] Return NIL.
   1: [MACSYMA-QUIT] Maxima top-level
   2: [ABORT       ] Skip remaining initializations.

Debug  (type H for help)

(LISP::FD-OPEN #P"file" :OUTPUT :ERROR NIL ...)
Source: Error finding source:
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM:  Source file no
longer exists:
   target:code/fd-stream.lisp.
0] back

0: (LISP::FD-OPEN #P"file" :OUTPUT :ERROR NIL ...)
1: (LISP::OPEN-FD-STREAM #P"file" :DIRECTION :OUTPUT :ELEMENT-TYPE
...)
2: (MEVAL1 (($OPENW) &FILE))
3: (MEVAL (($OPENW) &FILE))
4: ("DEFMSPEC MSETQ" ((MSETQ) $S (# &FILE)))
5: (MEVAL1 ((MSETQ) $S (# &FILE)))
6: (MEVAL ((MSETQ) $S (# &FILE)))
7: (MEVAL* ((MSETQ) $S (# &FILE)))
8: (CONTINUE
     #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>,
     Output = #<Synonym Stream to SYSTEM:*STDOUT*>>
     NIL)
9: (MACSYMA-TOP-LEVEL
     #<Two-Way Stream, Input = #<Synonym Stream to SYSTEM:*STDIN*>,
     Output = #<Synonym Stream to SYSTEM:*STDOUT*>>
     NIL)
10: (RUN)
11: (RUN)
12: (RUN)
13: (EXTENSIONS::EVAL-SWITCH-DEMON
      #<Command Line Switch "eval" -- ("(cl-user::run)")>)
14: (EXTENSIONS::INVOKE-SWITCH-DEMONS
      (#<Command Line Switch "quiet">
       #<Command Line Switch "core" --
       ("/usr/local/lib/maxima/5.12.0/binary-cmucl/maxima.core")>
       #<Command Line Switch "eval" -- ("(cl-user::run)")>
       #<Command Line Switch "-"> #<Command Line Switch
       "-disable-readline">
       ...)
      (("load" . #) ("eval" . #)))
15: ((LABELS LISP::%RESTART-LISP EXTENSIONS:SAVE-LISP))
16: ((LABELS LISP::RESTART-LISP EXTENSIONS:SAVE-LISP))

0]

-sen

On Tue, 10 Jul 2007, Raymond Toy wrote:

> sen1 at math.msu.edu wrote:
>> Well,
>>  I am running Fedore Core 6.  The only rpm available for 19d is in
>>  Fedora Core 7.  I tried a simple rpmbuild --rebuild and it did not
>>  work.
>>
>>   So, it seems that I would have to build 19d from
>>  source, remove 19c and install 19d.  I looked at the 19d source and,
>>  unfortunately it is not a simple ./configure, make, make install, but
>>  requires some attention.  I don't have time for that right now, so
>>  I'll see if I can do this later. I'll let you know if the problem 
>> disappears.
>
> I didn't expect you to rebuild it yourself; it's not so easy.  I would expect 
> there to be rpms for 19d somewhere.  Or you can grab a tarball for 19d (see 
> www.cons.org/cmucl) and untar it somewhere and use that to build maxima.  The 
> tarball is easy to install because it can be placed anywhere.
>
> The backtrace for sbcl looks weird because it looks like open is called with 
> on other additional flags, which doesn't make sense.  Perhaps I don't know 
> how to read sbcl's backtrace.
>
> Ray
>

-- 
  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------