Originally Posted by st_albert
ZOMG! clarification, please....
Hopefully what you mean is that, even if the user has "pretty print" enabled, the above will happen IF and ONLY IF THE USER clicks "fix automatically." If you click "fix manually" nothing much happens behind the scenes, but you are returned to the edit screen with at least a hint of what problem was detected.
In the former case, the user will reap what he has sown (perhaps there should be a warning... "Are you SURE you trust me to GUESS what you intended to do?") . In the latter case, no changes should be made, albiet the file must get fixed before another save can be made.
Yes in the case of the change being made via editing in an open tab that is the behaviour. The difference with earlier Sigil versions is that previously every time the tab lost focus it ran the check and then forced you to do something about it then and there. Which was both expensive and just plain damned annoying when you want to (for instance) copy some text from another tab or something. Now it is possible to switch to Preview View without fixing it yet, or switch away to another tab, or do a Find/Replace. It is only when you have asked Sigil to do an operation that *requires* valid xhtml that the check runs and the dialog appears. As before Fix Automatically is the "hope Tidy gets it right" option, and Fix Manually is the "leave it to me" option.
There is one notable exception to this rule which I am guessing some people don't realise, and that is the Replace All operation (and this is not new behaviour btw). Replace All works on the assumption that you don't have the file open in a tab, so it does the replacement and then it *automatically* does a clean afterwards to ensure that the resource remains valid. Hence why if for instance you do a replace all of "</p>" with "" you will see that actually the </p> tags magically came back. Of course depending on your F&R expression it could well be that the automatic clean makes other changes to your document. While it keeps Sigil structurally intact, it could have undesired effects for some scenarios. There are times where this comes in handy - one of my favourites is to get rid of pointless <span> tags from calibre conversions, as clean does a better job of matching those up than I can with a regex. However you should be aware that this behaviour happens, and if you don't trust clean then replace manually rather than using replace all. Perhaps we will offer something different around this behaviour in a future Sigil, but not for 0.6, there are only so many holes in the Sigil code colander we can plug at one time...
I kind of dislike autosave options because I like to experiment a lot with various coding before settling on an alternative. Now, if the program distinguished between autosaves and intentional saves (a la LibreOffice and many others) this would be a non-issue.
I 100% agree - an auto-save over the top of the file isn't desired, at the very least it has to be a backup copy and as I mentioned above it really needs to be more than just a save from 5 minutes ago in terms of recovery options. It will be interesting to see what evolves on this in future.
Thanks for your other kind words btw, there can never be enough fawning in lieu of the ridiculous hours we have all spent on developing this
. Every feature or change has been made because we believe the majority of users will get a positive reaction from it, be it performance, stability, productivity or just plain less annoying. So we love to hear confirmation of that especially from the long term users...