Reputation: 1343
In Emacs Lisp Reference Manual:
— Function: file-name-sans-versions filename &optional keep-backup-version
This function returns filename with any file version numbers, backup version numbers, or trailing tildes discarded.
If keep-backup-version is non-nil, then true file version numbers understood as such by the file system are discarded from the return value, but backup version numbers are kept.
What does the "true file version numbers" in the second paragraph mean?
Upvotes: 1
Views: 240
Reputation: 1714
Systems such as OpenVMS use a version number on files, such that the when you created a file, say HELLO.TXT the actual filename would be HELLO.TXT;1 where the "1" is the version number. If you editted the file and saved it, the file system would automatically save a complete new copy as HELLO.TXT;2
Whenever you open the file, you get the highest version number automatically, so usually you don't need to worry about them at all. You could always specify the exact version number if you wanted, or use ;-1 to get one version prior, ;-2 for two versions prior etc. using ;-0 would open the oldest version available. Things like large databases would update the file, which didnt create new versions.
More detals: http://en.wikipedia.org/wiki/Files-11
Upvotes: 2