0

I get asked this and it gives me these options:

You want to modify a buffer whose disk file has changed
since you last read it in or saved it with this buffer.

If you say y to go ahead and modify this buffer, you risk ruining the work of whoever rewrote the file. If you say r to revert, the contents of the buffer are refreshed from the file on disk. If you say n, the change you started to make will be aborted.

Usually, you should type r to get the latest version of the file, then make the change again.

With ediff-current-file, I can view the diff between saved and buffer, but couldn't this be called from this window?

I also get a GUI popup window saying

* has changed since visited or saved. Save anyway?

How can I prevent emacs from showing such a graphical popup?;)

Jason Hunter
  • 709
  • 4
  • 10
  • GUI dialogues only happen if you used the mouse for the command which triggered it (which is typically convenient, given that you're using the mouse). If you use the keyboard, Emacs will prompt you in the minibuffer instead. – phils Mar 15 '23 at 09:11
  • I never use a mouse in emacs, so is there any way to override this? – Jason Hunter Mar 15 '23 at 09:17
  • I believe that Emacs will have registered a mouse event, so have a ponder about why that might be. You can disable the feature via the use-dialog-box user option. – phils Mar 15 '23 at 09:29

1 Answers1

1

With ediff-current-file, I can view the diff between saved and buffer, but couldn't this be called from this window?

That would be a nice enhancement. As it is, the behaviour is hard-coded in ask-user-about-supersession-threat.

I suggest you M-x report-emacs-bug to make a feature request. Something along the same lines as save-some-buffers-action-alist, perhaps.

phils
  • 50,977
  • 3
  • 79
  • 122