Is it possible to prevent TextEdit's "The file has been changed" dialog from appearing unnecessarily?

Solution 1:

I've never seen this sheet without the underlying file being changed. Try opensnoop on the file to determine the process which is accessing the file:

$ sudo opensnoop -f /path/to/file.txt
  UID    PID COMM          FD PATH
  501  32092 Finder        14 /path/to/file.txt
    0     81 mds           28 /path/to/file.txt
  501  41898 mdworker       9 /path/to/file.txt
  501  42646 TextMate      16 /path/to/file.txt
  501  42646 TextMate      16 /path/to/file.txt
  501  42646 TextMate      25 /path/to/file.txt
  501  42646 TextMate      26 /path/to/file.txt

This is a live printout, so keep the opensnoop running until you get the sheet, then check your Terminal window and look back to see the process. ⌃C stops opensnoop when you're finished. You will need to disable System Integrity Protection to use opensnoop and can be re-enabled afterwards.