0

Sometimes I get a mini-buffer prompt to check if I want to edit the buffer.

Instead of answering this, I would like to revert all buffers, however this prompt remains.

How could I cancel this prompt? (which is no longer needed when reverting all buffers)

Drew
  • 77,472
  • 10
  • 114
  • 243
ideasman42
  • 8,786
  • 1
  • 32
  • 114

1 Answers1

1

Based upon a reading of the code for the function ask-user-about-supersession-threat, it may be sufficient to use (signal 'file-supersession (list "My custom message")) to cancel the mini-buffer prompt from elisp. See also the functions abort-recursive-edit ["Abort the command that requested this recursive edit or minibuffer input."] and top-level ["Exit all recursive editing levels. This also exits all active minibuffers."]

lawlist
  • 19,106
  • 5
  • 38
  • 120
  • (signal 'file-supersession (list "My custom message")) displays a message but the mini-buffer prompt remains. The issue with abort-recursive-edit and top-level is they both are noreturn functions, making them complicate functions you might want to call when composing functionality. – ideasman42 May 28 '20 at 01:58