Stephen Leake, 2007-04-29: > Stephen Leake <[EMAIL PROTECTED]> writes: > >> I don't see any way to get write-file to _not_ set buffer-modified-p. >> I think this is a bug in Emacs; I'll raise it on emacs-devel. > > I started posting on this, but realized I don't actually understand > why (write-region (point-min) (point-max) file) doesn't work here.
It does work. Thanks for the hint. > xmtn-dvc.el has comments that talk about getting the coding system > correct. I understand coding system issues only in a limited way; I'm > a native English speaker, so I can get by with ASCII. My only > interaction with coding systems is DOS vs Unix end of line codings. > And for that issue, write-region is sufficient. The comments only attempt to say why going through a temporary file is necessary at all, not whether this file has to be written with `write-file' as opposed to `write-region'. I extended them in an attempt to make this clearer. > Christian; can you give a particular example of the problem? Issues related to coding systems always need to have automated test cases. They are too hard to get right and too easy to break again, and not something that comes up during casual testing. So there are test cases for all the coding system related issues that I'm aware of. If xmtn's test cases still pass with `write-region', then `write-region' works; or, more precisely, if the test cases still pass, there's no functionality in xmtn that will break due to `write-region' that wouldn't break sooner or later anyway due to lack of automated test cases. (An even better solution is `with-temp-file' in this case, so I used that.) (It would be good to find out why the coding system related tests fail on Windows, but I don't think that's urgent. I hope to be able to test xmtn on Windows myself soon.) Christian. _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
