Kill and related topics



On Fri, 2005-04-08 at 15:21, C Y wrote:
> Hi all.  I have been doing some thinking, and I have a few
> comments/questions about kill and related topics, stemming from the
> whole post_eval_functions effort.

I'm sorry it took so long for me to get around to writing a reply to
your original message. I'm afraid your whole thought process here is
based on a misconception about what kill does/should do.

> a)  After thinking it over, I think perhaps it is OK that kill(all) (or
> kill(post_eval_functions) for that matter) does not reset
> post_eval_functions,

No, it should reset post_eval_functions.

>  since it will also not reset any other "system"
> settings changed by the user. 

Yes, kill(all) does reset other system settings changed by the user. For
example, the values of rules is reverted back to the default.

>  This is consistent now thanks to Jim, so
> it is probably OK.  A more intelligent rewrite of my processing
> function should (I hope) avoid problems that might be caused by this.  
> 
> b)  However, along those lines, I would like to ask if a
> reset(all)/reset([specific name]) command could be put in that would
> reset all "system" settings to their defaults, but leave anything user
> defined alone.  Something like this (fake) session:
> 
> (%i1) f(x) := a*x;
> (%o1) 				  f(x) := a x
> (%i2) post_eval_functions : [f];
> (%o2) 				     [a f]
> (%i3) kill(all);
> (%o3) 				    f(done)
> (%i1) post_eval_functions;
> (%o1) 				    f([f])
> (%i2) reset(post_eval_functions);
> (%i3)                                done
> (%i4) post_eval_functions;
> (%o4)                                 []
> 
> This way, the user has the options of a) remove all user defined
> quantites/functions/etc., but not all "setting" changes, b) removing
> all "setting" changes but retaining all defined
> quantities/functions/etc., or c) using both kill(all) and reset(all) to
> return to the exact original Maxima state (optionally reset could
> reload maxima-init.lisp and maxima-init.mac).
> 
> Does this functionality already exist and I have just missed it?  Does
> it make sense to anybody else?

You can already do kill(values), kill(functions), or anything else
listed in infolists. Are you aware of that?

--Jim