经常发生文件缓冲区被修改(duh!)。在退出之前,emacs 会询问是否保存更改。现在知道实际发生了什么变化会很有趣。有没有办法找出来?
最佳答案
从 Emacs 22.1(至少)开始,'save-buffers-kill-emacs
(C-x C-c 的默认绑定(bind))提示您输入每个具有文件的未保存缓冲区。当提示保存并查看差异时,键入 d。
从帮助文档中:
Save some modified file-visiting buffers. Asks user about each one.
You can answer `y' to save, `n' not to save, `C-r' to look at the
buffer in question with `view-buffer' before deciding or `d' to
view the differences using `diff-buffer-with-file'.
如果您查看提示,它应该会显示如下内容:
Save file /path/to/file.txt? (y, n, !, ., q, C-r, d, or C-h)
键入 C-h 会给你一个更详细的描述(但 d 是你所要求的):
Type SPC or `y' to save the current buffer;
DEL or `n' to skip the current buffer;
RET or `q' to give up on the save (skip all remaining buffers);
C-g to quit (cancel the whole command);
! to save all remaining buffers;
C-r to view this buffer;
d to view changes in this buffer;
or . (period) to save the current buffer and exit.
关于emacs - 突出显示缓冲区修改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/626492/