From mint-bounce@lists.fishpool.fi Wed Mar 19 20:34:45 2008 Message-ID: <47E1AA75.4060303@chello.nl> Date: Thu, 20 Mar 2008 01:06:13 +0100 From: Henk Robbers User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] Editor idea References: <20080319164149.37ufxhiqzo0k0kcs@pop.freeola.net> In-Reply-To: <20080319164149.37ufxhiqzo0k0kcs@pop.freeola.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: h.robbers@chello.nl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: p.slegg@scubadivers.co.uk wrote: > I have had an idea for an enhancement to an editor that might be > useful. Maybe there is an editor that does this all ready, it's not > a new idea but might be simple to implement. > > > What I thought was this. > > 1. User opens a file for editing with the editor in "version control mode". > 2. File is edited. > 3. When the user tries to save the file the Editor looks for a folder called > "orig" and creates it if necessary. > 4. Editor looks in orig for a copy of the file being edited. > 5. If the file does not exist then the original file is moved into the orig > folder so that the amended file does not overwrite it. > 6. New version of file is saved. > > By doing this, the original source code would be kept while the user does > many edits on a file. > > Would this have an affect on using "make" ? Would it try to "make" everything in > the orig folder ? If so, could the folder be hidden ? (.orig ?) > > The next obvious step would be to get the editor to "diff" the original and > the edited file to highlight where lines have been inserted and deleted. It > could allow the user to quickly compare their changes to the original and > even allow the user to rollback individual line changes. > How about this? You want to protect the original file: Make it read_only The editor, detecting you want to edit a resd_only file, changes to 'diff' mode. It stores all changes internally in a diff file. What you see on the screen is a classic collate of original and diff. When you save, only diff file is written. I have worked on a mainframe compiling system this way. The compiler was able to process original plus diff when requested. It was called "spot amendments". I have considered to implement this in AHCC, but havnt found enough time and patience thus far, although AHCC(and AHCX) already use a internal diff file and collate process for its undo. -- Groeten; Regards. Henk Robbers. http://members.chello.nl/h.robbers Interactive disassembler: TT-Digger; http://digger.atari.org A Home Cooked teXt editor: AHCX