>>>>> On Thu, 22 Jun 2000 22:38:47 -0700, Dave Peticolas
>>>>> <[EMAIL PROTECTED]> said:
>> It might be good to keep files in the same directory as much as
>> possible, picking another name if necessary. I think Emacs handles
>> all these cases pretty well; it might be worth looking at how it
>> does it. (But it might also be worth implementing _something_
>> first.)
Dave> I looked around the Emacs (rather XEmacs, but it's probably very
Dave> similar) source and they save files pretty much in the same way,
Dave> i.e., they save to a temporary file in the same directory, and
Dave> then rename it. If they can't create a new file in the
Dave> directory, and the file doesn't have a 'precious' flag set, then
Dave> they just write over the existing file. I think we can assume
Dave> that any GnuCash data file is 'precious', so I think we should
Dave> just require the directory to be writable, rather than resort to
Dave> that.
Since you brought up *macs.....
Upon making changes to file, file~ is created. I think it is a move
of file to file~, with a copy back to file, to keep from having out of
space issues.
As I edit file, auto-saves are auto-saved into #file# every period.
period is based on time and/or keystrokes. The other nice thing about
it is that I can have my autosaves saved to non-nfs mounts. I edit
large files in Xemacs, my main INBOX is 111M, and auto-saving that
over nfs would be too painful to be useful. The #file# autosaves are
nice, because when I open a file, if #file# is newer than file, I am
asked if I want to recover with #file#.
There are a number of auto-save* variables. it completes as follows:
Possible completions are:
auto-save-default
auto-save-directory
auto-save-directory-fallback
auto-save-file-format
auto-save-hash-directory
auto-save-hash-p
auto-save-interval
auto-save-list-file-name
auto-save-list-file-prefix
auto-save-offer-delete
auto-save-timeout
auto-save-version
auto-save-visited-file-name
here is the documentation for these variables in my currently running
version of xemacs, which is ...
`emacs-version' is a variable declared in Lisp.
Value: "20.4 \"Emerald\" XEmacs Lucid"
Documentation:
Version numbers of this version of XEmacs.
--
`auto-save-default' is a variable declared in Lisp.
Value: t
Documentation:
*Non-nil says by default do auto-saving of every file-visiting buffer.
--
`auto-save-directory' is a variable declared in Lisp.
Value: "/var/tmp/rob/rob-autosave"
Documentation:
If non-nil, fixed directory for autosaving: all autosave files go
there. If this directory does not yet exist at load time, it is
created and its mode is set to 0700 so that nobody else can read your
autosave files.
If nil, each autosave files goes into the same directory as its
corresponding visited file.
A non-nil `auto-save-directory' could be on a local disk such as in
/tmp, then auto-saves will always be fast, even if NFS or the
automounter is slow. In the usual case of /tmp being locally mounted,
note that if you run emacs on two different machines, they will not
see each other's auto-save files.
The value (expand-file-name "~/autosave/") might be better if /tmp
is mounted from swap (possible in SunOS, type `df /tmp' to find out)
and thus vanishes after a reboot, or if your system is particularly
thorough when cleaning up /tmp, clearing even non-empty subdirectories.
It should never be an efs remote filename because that would
defeat `efs-auto-save-remotely'.
Unless you set `auto-save-hash-p', you shouldn't set this to a
directory in a filesystem that does not support long filenames, since
a file named
/home/sk/lib/emacs/lisp/auto-save.el
will have a longish filename like
AUTO-SAVE-DIRECTORY/#\!home\!sk\!lib\!emacs\!lisp\!auto-save.el#
as auto save file.
See also variables `auto-save-directory-fallback',
`efs-auto-save' and `efs-auto-save-remotely'.
--
`auto-save-directory-fallback' is a variable declared in Lisp.
Value: "/var/tmp/rob/rob-autosave"
Documentation:
Directory used for local autosaving of remote files if
both `auto-save-directory' and `efs-auto-save-remotely' are nil.
Also used if a working directory to be used for autosaving is not writable.
This *must* always be the name of directory that exists or can be
created by you, never nil.
--
`auto-save-file-format' is a simple built-in variable.
Value: t
Documentation:
*Format in which to write auto-save files.
Should be a list of symbols naming formats that are defined in `format-alist'.
If it is t, which is the default, auto-save files are written in the
same format as a regular save would use.
--
`auto-save-hash-directory' is a variable declared in Lisp.
Value: "/home/rob/autosave/hash/"
Documentation:
If non-nil, directory used for hashed autosave filenames.
--
`auto-save-hash-p' is a variable declared in Lisp.
Value: nil
Documentation:
If non-nil, hashed autosave names of length 14 are used.
This is to avoid autosave filenames longer than 14 characters.
The directory used is `auto-save-hash-directory' regardless of
`auto-save-directory'.
Hashing defeats `recover-all-files', you have to recover files
individually by doing `recover-file'.
--
`auto-save-interval' is a built-in integer variable.
Value: 1500
Documentation:
*Number of keyboard input characters between auto-saves.
Zero means disable autosaving due to number of characters typed.
See also the variable `auto-save-timeout'.
--
`auto-save-list-file-name' is a simple built-in variable.
Value: "/var/tmp/rob/rob-autosave/.saves-9062-tungsten.su.valinux.com"
Documentation:
File name in which we write a list of all auto save file names.
--
`auto-save-list-file-prefix' is a variable declared in Lisp.
Value: "/var/tmp/rob/rob-autosave/.saves-"
Documentation:
Prefix for generating auto-save-list-file-name.
Emacs's pid and the system name will be appended to
this prefix to create a unique file name.
--
`auto-save-offer-delete' is a variable declared in Lisp.
Value: nil
Documentation:
*If non-nil, `recover-all-files' offers to delete autosave files
that are out of date or were dismissed for recovering.
Special value 'always deletes those files silently.
--
`auto-save-timeout' is a variable declared in Lisp.
Value: 30
Documentation:
*Number of seconds idle time before auto-save.
Zero or nil means disable auto-saving due to idleness.
The actual amount of idle time between auto-saves is logarithmically related
to the size of the current buffer. This variable is the number of seconds
after which an auto-save will happen when the current buffer is 50k or less;
the timeout will be 2 1/4 times this in a 200k buffer, 3 3/4 times this in a
1000k buffer, and 4 1/2 times this in a 2000k buffer.
See also the variable `auto-save-interval', which controls auto-saving based
on the number of characters typed.
--
`auto-save-version' is a variable declared in Lisp.
Value: "1.25"
Documentation:
Version number of auto-save.
--
`auto-save-visited-file-name' is a variable declared in Lisp.
Value: nil
Documentation:
*Non-nil says auto-save a buffer in the file it is visiting, when practical.
Normally auto-save files are written under other names.
--
rob
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]