7

Every time when I change something in a buffer, and then I decided to install a package from packages.el, Emacs is repeatingly asking me if I want to save the other buffers, because it's changed.

I fail to understand the relation between this buffer and the installation of a package. On the internet I found no suitable answer.

Anyone care to explain the logic behind this?

Thanks in advance.

  • Please provide a recipe, so we know just what you are talking about. It sounds like Emacs is about to kill a buffer that has been modified, and is letting you know that so you can save it first. – Drew Apr 24 '16 at 0:43
  • See also emacs.stackexchange.com/questions/21347/… – wasamasa Apr 24 '16 at 9:37
7

There isn't a lot of logic behind this. At least, not in the sense of a conscious decision. It's more of a feature of the compilation process that really doesn't apply to package management but nobody has bothered to fix it yet.

Whenever Emacs is about to compile something it asks you if you want to save edited buffers. That's actually something very useful, and makes perfect sense when you're compiling some code you're working on.

In particular, this applies to the byte compiler, which compiles Elisp files. And one of the steps of installing a package is to byte compile it. When this happens, Emacs will do its usual routine of asking you to save stuff, even though it doesn't really matter here.

  • Thanks for your reply. It makes sense then. It's even asking to save org-files, php-files, Javascript files etc who all cannot be compiled. Poor boy when package.el tells you you can upgrade 40 packages, and you just do it. Then you need to confirm/deny for every unsaved buffer that you don't want to save it. – ReneFroger Apr 24 '16 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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