[Idle-dev] Separate process; automatic save for a run

David Scherer dscherer@milliway.kssacct.com
Thu, 10 Aug 2000 14:56:30 +0000 (GMT)


On Thu, 10 Aug 2000, Bruce Sherwood wrote:

> Guido said:
> 
> > I'm not sure what to do about your proposed patch, but I do want to
> > say that I am *against* saving without asking the user.

...
 
> Another important feature of Scherer's version of IDLE is that you just
> press F5 and the file is automatically saved and run (in a separate
> process). This is a different protocol than I have used in other
> programming environments, but I find that I like it a LOT in practice.
> Asking the user whether to save is very intrusive by comparison. I do agree
> that it would be even better for the default save to go to something.new,
> and upon closing the file the user could be asked whether to copy
> something.new to something.py. (Obviously with the current protocol I make
> a backup copy before doing extensive editing.)

I think the ideal behavior is:

1) The files being edited are only overwritten with the explicit
consent of the user.

2) The program always executes *as though* the user had saved all buffers.
If the user's script imports a module which is being edited, the editor
buffer needs to be used instead of the file on disk.

3) A single keystroke suffices to run a program.

One way to implement this is with ".new" files.  Another, which makes a
lot of sense in a multiple-process model, is to pass the buffers directly
to the loader program through the control channel (a socket in my design).
In either case, import needs to be hooked to get the right version of
modules.

Dave