On Jun 6, 2007, at 4:38 AM, Helge Hafting wrote:
Bennett Helm wrote:
On Jun 5, 2007, at 9:52 AM, Jean-Marc Lasgouttes wrote:
"Jürgen" == Jürgen Spitzmüller <[EMAIL PROTECTED]> writes:
Jürgen> Bennett Helm wrote:
Create a document with multiple occurrences of "foo". Turn change
tracking on, select a chunk of text (including some occurrences of
"foo"), and delete. Now go to the top and turn change tracking
*off*. Using Edit > Find & Replace, Replace all instances of
"foo" with "bar". The instances of "foo" in the change-tracked
deleted text have now been replaced with instances of "bar", but
they are no longer deleted. This is unexpected -- at least by
me.
Jürgen> Here's a patch for replace all. As noted on bugzilla, I'm
not
Jürgen> sure we should restrict manual replace.
I think we should restrict manual replace too (if possible). It
should
not be allowed to do with replace something that would not be
possible
via normal editing.
I agree with the last sentence, but notice that the patch doesn't
do this! When change tracking is turned off, it is entirely
possible to delete -- remove from the file -- text that is marked
as deleted.
Then you simply commit (parts of) that deletion, albeit without
using the change tracking machinery. I see nothing very wrong with
that.
I don't either.
Nonetheless, I think even manual replace ought to skip deleted
text. It's not expected behavior even on manual replace to replace
deleted text with undeleted text (as the patch currently allows).
And I don't think we should replace deleted text with deleted text
either: that obscures the document history which is part of the
point of change tracking.
If you turn off change tracking and edit, then surely all new stuff
should
be without the change tracking markings. (i.e. not deleted or marked
as inserted by someone.) You may be able to add inside a deleted
region,
but that should split the deleted region in two.
In general I see nothing wrong with this; my only complaint was that
it is unexpected for this to happen during search and replace.
A user wanting something different should turn the change tracking
on and use it. Adding "deleted text" is a lot like lying about what
happened.
There are legitimate reasons for wanting to turn change tracking on
and off, depending on what you're doing. I tend to turn it on only
when I'm making a major revision to a particular part of a document,
especially when I have doubts about whether the revision is an
improvement; I then turn it off when making minor changes (like
fixing typos or grammatical errors). If I change my mind about what
word to use for describing something and want to do a global replace,
I turn change tracking off since I don't want change tracking for
this change cluttering up the screen (or the printed text if I choose
to show changes). But then I don't want LyX to turn a deleted search
term into an undeleted replace term; rather, I want deleted text
ignored. The same goes with manual search and replace, in part for
this reason and in part for the reason you give: adding "deleted
text" would be like lying.
Bennett