ww-tedit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ww-tedit-dev] idea: diffs for .rec files and .bak files


From: petar marinov
Subject: Re: [ww-tedit-dev] idea: diffs for .rec files and .bak files
Date: Tue, 23 Aug 2005 16:30:01 -0700
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

petar marinov wrote:
* I thought it would be cool if the .rec files could be just ordinary diff files that can be applied as a patch to the original file without a need to start the editor. The structure of a .rec file, which is not a snapshot but incrementaly accumulated in the course of editing will maybe not allow production of a diff.

One possible standard format would be a _sed_ script. I experimented a little with it today just to prove that most likely there is no standard format that might satisfy the needs of the .rec file.

The recovery files are incremental changes, _sed_ script modifies an input stream. The steps of the recovery file are applied on top of each other, _sed_ script applies *only* to unmodified input stream.

One possible solution, maybe not very ellegant, is the recovery file to be a bash script that applies the recovery steps one by one. Each step might be described in _sed_ format.

At this point, I would consider any modifications to the format of the .rec file as purely theoretical.

* Mabe it is a useful feature in "Save As" to have an option to produce a diff instead to store the whole file.

I imagine that this will be useful for correspondance, sometimes you want to send only a patch to someone, then usually you first load, edit, safe and then generate the file. Few of the steps can be reduced. Also the editor must be able to apply patches, I imagine. This is alot of work. Maybe in 5 years, judging by the speed with which more immediate plans are executed ;-)

* What are .bak files? They are a snapshot of what was the state of a file before it was last saved. Well, it is inconvenient for two reasons. A) it is only one snapshot B) it is as large as the last version of the file. Maybe we can produce diffs instead of .bak files. Because those diffs might be smaller than the plain .bak file we might store not only one but store a number of them, one should be able to restore a version of the file by applying the diffs as patches to the last version of the file.

One danger about the .bak file expressed as a patch is that if anyone modifies the original file with another editor the patch would be unapplicable. This is maybe not a major constrain, in general the patche still holds the advantage of preserving last few version of the original file. Also, the editor would be able to always show what has been modified from the current and the previous version or few versions back.

-petar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]