[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 10 14:22:36 2003 
Subject:Re: pop-forum: Ved and CTRL+S (and ved_autosave) 
From:Aaron Sloman 
Volume-ID:1030110.07 


D.J.Gurnell@cs.bham.ac.uk writes:

> A quick Ved question from a child of the Windows look and feel.
>
> While I normally manage to hit "ENTER w1" to save a file, from time to
> time my subconscious gets the better of me and I hit "CTRL+S". This seems
> to have the unfortunate effect of either crashing Ved, or at least putting
> it into a state from which I don't know how to recover.

It's part of the XON/XOFF convention that used to be used (and
probably still is used) by networked computers linked by a terminal
conneciton. If a receiving computer has its buffers full full it can
send a stop signal to the other computer to suspend transmission
and a start signal to restart when it is ready for more.

Where one of the computers is a human being it can be done via the
keyboard.

The default convention is that CTRL-S is the stop and CTRL-Q
the start.

So you can always restart with CTRL-Q.

Alternatively there is probably a way of turning off the XON/XOFF
mechanism in your current terminal connection. Try MAN STTY

If you manage to turn it off then you could put into your vedinit.p
file

    vedsetkey('\^S', "ved_w1");

and then CTRL S will save the file.

Also if you are using the bham setup, you are probably using
ved_autosave and in your vedinit.p file you may have something like

    ;;; turn on autosaving
    uses ved_autosave
    0 -> vedautosave_min_write;     ;;; Minimum number of changes required for save
    5 -> vedautosave_minutes;       ;;; Frequency of saving

You can change the 5 to 1 if you'd like it to save every miniute.

You can also alter the delay interactively.

    ENTER autosave

shows you the current setting, and the time till next autosave.

    ENTER autosave 2

changes to saving every 2 minutes (but does not alter your vedinit.p
file).  More information in HELP ved_autosave


The older mechanism, vedautowrite, was based on counting the number
of changes made in a file, and is not very good. If vedautowrite is
1000 you could open 5 files, make 999 changes in each of them over a
period of several hours, and not have anything saved.

> I'm using ordinary ved (not xved) in a pretty much standard Birmingham Uni
> Poplog setup.

Me too.

Note for people not using the Bham setup: out version of
ved_autosave can be fetched from
    http://www.cs.bham.ac.uk/research/poplog/auto/ved_autosave.p
    http://www.cs.bham.ac.uk/research/poplog/help/ved_autosave

Among the improvements is the option of specifying the number of
saved backup versions for each file produced by ved_autosave.
(See also REF VEDVERSIONS, pop_file_versions)
The default is

	3 -> vedautosave_max

giving you file, file-, file--

There's still scope for improving the algorithm for deciding when to
update the older versions.

Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html