When I run M-x package-install
to install a package, I get asked whether I want to save files, that have been modified since the last save (Save file /a/b/c.txt? (y, n, !, ., q, C-r, d or C-h)
in the minibuffer). I get this prompt for each modified file, and, if installing multiple packages from the *Packages*
buffer, I get asked multiple times! This is incredibly frustrating, especially as the files that I am asked about have nothing to do with compilation, and could, in fact, be any files at all, including ordinary text files.
I did a bit of sleuthing, and found that, at the end of the day, package.el runs package-unpack
to install a package, which runs package--compile
, which runs byte-recompile-directory
. I have therefore set the following in my init.el (even though I don't think I should have to do that(!)):
(setq compilation-ask-about-save nil)
No improvement.
Frankly, I thought this must be a side-effect of some customization of mine, since in no way would I consider this to be desirable behavior...until I ran emacs -Q
to reproduce this without my config, and, to my surprise, ran into the very same thing. While this seems baffling, it also offers me some hope that perhaps someone has figured out a way to disable this super-annoying prompt?
?
orC-h
(as the prompt suggests), to learn what each of your options are. You will see that you can provide the same response for all modified files in the package at once. Do that and you will not be prompted for each modified file. (This does not respond to the part of your question that deals with prompts for multiple packages, however.)