Eli Zaretskii writes: > Thanks, a few comments below: Thanks for reviewing. > If you want to make sure the file's contents is _exactly_ some text, > you need to write the buffer text to the file with no encoding > conversions, and you need then to visit the file with > insert-file-contents-literally, to avoid decoding conversions. > Otherwise you might get false positives and false negatives due to > encoding/decoding of text and of EOLs. Done: insert-file-contents-literally for reading, binding (coding-system-for-write 'no-conversion) for writing. > Also, compiling the new test I get byte-compiler warnings: I obviously focused on the test results only ... all warnings fixed. Please see the attached updated patch. Thanks