Subject: [clisp-list] saveinitmem? - vars reset and dribble bug

From: Peter Wood <[email-masked]>
Date: Sat Mar 16 19:30:03 2002

Hi

On Gun/Linux, with CVS Clisp, saving a memory image does not save the
value of various encoding vars, (eg *terminal-encoding*).

[2]>  *terminal-encoding*
#<ENCODING CHARSET:ASCII :UNIX>
[3]> (load (make-pathname :directory '(:absolute "home" "prw") :name ".clisprc"))
;; Loading file /home/prw/.clisprc ...
;; Loading of file /home/prw/.clisprc is finished.
T
[4]>  *terminal-encoding*
#<ENCODING CHARSET:ISO-8859-1 :UNIX>
[5]> (saveinitmem "testinit.mem" :quiet t)
953952 ;
524288

;in the new memory image...

[3]> *terminal-encoding*
#<ENCODING CHARSET:ASCII :UNIX>
[4]> (bye)

In addition, the Clisp run with the new memory image reported that it
was dribbling to the file which it had dribbled to to record the
session in the original memory image.  So the stream was open in the
new memory image.  Even if I had forgotten to stop #'dribble (which I
didn't) I don't think it should do that.

So that's 2 bugs (I think).

Regards,
Peter

---

From: Sam Steingold <[email-masked]>
Date: Sun Mar 17 12:32:03 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] saveinitmem? - vars reset and dribble bug"
> * Sent on Sun, 17 Mar 2002 04:15:55 +0100
> * Honorable Peter Wood <[email-masked]> writes:
>

I know you hate to hear this, but "this is a feature, not a bug". :-)
the -encoding* are symbol macros, not variables, and they are
initialized from the command line options and the environment.

Yes, there might be a situation when you would prefer to save the
encoding information.  But this is not really safe since such an image
might have problems with different terminals (which do not understand
the encoding you save)...

I hope Bruno will shed some light here.

> didn't) I don't think it should do that.

I just fixed this.
thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
A computer scientist is someone who fixes things that aren't broken.