The problem, of course, is that the temp file is deleted shortly after "diff" exits, so the default revert-buffer function installed by "diff" fails. The simplest solution seems to be to install a new revert-buffer function that redoes the whole process of checking for a file buffer and writing the temp file. The attached patch does a minimal refactoring of "diff" and "diff-buffer-with-file" to do just that, while trying to DTRT if the user renames the diff buffer or kills the original buffer. -- Bob Rogers http://www.rgrjr.com/