James Dyer has a quick tip that may be interest you. The issue is reverting buffers. There are several ways of doing this. One is to simply call find-alternate-file
(Ctrl+x Ctrl+v). That’s what I always did but there’s the more specific revert-buffer
(Super+u) that handles a few edge cases.
The problem with revert-buffer
is that it asks for confirmation. If you’re calling it interactively you probably don’t want the confirmation. Dyer’s tip is to use revert-buffer-quick
instead. It’s like revert-buffer
but (usually) doesn’t ask for confirmation. Take a look at the online documentation to get the details.
Here’s another tip, this time from Irreal. If, like me, you usually call revert buffer for particular files or for a particular directory, you can set revert-without-query
to inhibit the confirmation query for those files or directories.
In a sense, this is all small potatoes. Whether you need to confirm your intentions or not doesn’t matter much in the end but the thing about Emacs is that it does all it can to reduce friction in your workflow. It’s also a case study in why your mastery of Emacs is never complete. Both revert-buffer-quick
and revert-wthout-query
are obscure features that are hard to discover on your own but they’re there to help you even if they’re hard to find.