It’s sometimes useful to be able to run Emacs as a headless server process that responds to commands given over a network connection. However, Emacs is primarily a platform for interactive usage, so many commands prompt the user for feedback in certain anomalous situations. This makes this use case more difficult, since the server process will just hang waiting for user input.
inhibit-interaction variable to something
nil makes Emacs signal a
instead of prompting, which can then be used by the server process to
handle these situations.
Here’s a typical use case:
(let ((inhibit-interaction t)) (respond-to-client (condition-case err (my-client-handling-function) (inhibited-interaction err))))
my-client-handling-function ends up calling something that
asks the user for something (via
read-from-minibuffer or the like), an
inhibited-interaction error is signalled instead. The server
code then catches that error and reports it to the client.