Yes, I understood that. My intention is to notify the user about the deletion but not
really want to revert the file. Emacs provide other options other than reverting. A
"revert" here might mean "close this buffer". However,this might need further
modification to notify the user about the deletion instead of the normal modification
notification. Using the original `ask-user-about-supersession-threat' might be a bit
confusing if file is deleted. What do you think?

 


2016-08-08 16:02 GMT+08:00 Andreas Schwab <schwab@suse.de>:
On Mo, Aug 08 2016, 路客 <luke.yx.lee@gmail.com> wrote:

> When editing a file in Emacs and switching git branches, sometimes
> a file will be removed but Emacs won't detect it. Unlike modified
> files it will ask me to revert, deleted files are not. Is it
> intentional?

There is nothing to revert from.  A buffer visiting a non-existing file
isn't an error condition, saving it will not lose anything.

Andreas.

--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



--
Best regards,
Luke Lee