It is not true that
‘C-x C-v RET’ is the same as
‘revert-buffer’. See C-x C-v is not revert-buffer.
– DrewAdams 2012-04-23 15:36 UTC
Besides the Dired scenario, I can’t find a reason to really care.
– AaronHawley 2012-04-23 18:58 UTC
That doesn’t surprise me.
What is true of
‘revert-buffer’ in Dired is true in general.
‘revert-buffer’is a different command from
‘find-alternate-file’. They are not defined to do the same thing. Look at their code, if you want to understand this.
‘revert-buffer’applies to buffers other than just file buffers – Dired is only one example of this. See the doc for
– DrewAdams 2012-04-23 20:49 UTC
Fortunately, in “buffers other than just file buffers” these are modes where
‘revert-buffer’ is bound to a better key than
‘C-x C-v RET’ – usually the
‘g’ key. I appreciate
‘revert-buffer-function’ as a good hack for Emacs modes, but it does muddle the correspondence between the name of a command and its behavior in some cases. One of the many dangers entailed in making a cheat sheet for a flawed text editor I suppose.
– AaronHawley 2012-04-24 13:45 UTC
Dunno about “flawed text editor” … but if you want to make your cheat sheet a bit more accurate without adding verbiage, consider changing “same as previous” to “similar to previous” or some such, in the description of
‘C-x C-v RET’.
And yes, a cheat sheet always runs the risk of misleading somewhat. “Restore buffer with version on disk” also suffers in this regard. Such is life on a cheat sheet. ;-)
– DrewAdams 2012-04-24 14:09 UTC