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)


1 Answer 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."]

  • (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
    Commented May 28, 2020 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.