On Wed, Nov 28, 2012 at 10:42 AM, Andrew Parsloe <apars...@clear.net.nz> wrote:
> I don't think change tracking works here, since the file is modified
> *externally* (the built-in feel, although pleasing, is pure illusion). My
>
I see. What about using the CLI: Can LyX compare two documents from
the command line, and then output a third that 'tracks changes'
between the two?

If this were possible, then in theory it would be possible to come up
with a script that takes the original file, saves the processed files
to some temporary name, has LyX compare the two and output a third
file that tracks the changes between the two, and the loads this last
file in the LyX buffer. This way the user can check that all went
fine, and reject changes if not.


> solution to this problem has been to write another script which overwrites
> the current buffer with the backup file. This script is accessible with a
> further toolbar button and the buffer-reload button. If something goes
> wrong, recovery is two clicks away.
>
> Since I have a number of scripts exploiting the 'trick', each requiring an
> alternatively named LyX format, I realised at some point that I needed a
> single python master script which would call the relevant sub-script to sort
> a table or sort a list or expand an abbreviation or do a calculation ...
> according to a signal in the document. That way only one alternative LyX
> format was needed. I've used custom insets to provide the signal. Doing
> things this way also means that the same toolbar buttons (or shortcuts) can
> be used in all cases. I'm working on a find-&-replace script (e.g. across
> paragraph boundaries) at the moment, and have documentation to write and no
> doubt will burden the list with this sometime in the weeks ahead.
>
Looking forward to this.

Liviu

Reply via email to