Emacs will not close due to ido.last buffer

When I try to close emacs, I get a message

"buffer ido.last modified; kill anyway?"

and no matter what I answer, emacs remains open. But I can not open this buffer, and the ido.last file does not exist. How can I close my emacs?

+7
emacs
source share
4 answers

IDO is trying to save a file called ido.last to the ~/.emacs.d . But in your case, the IDO does not seem to be able to do this. Your directory ~/.emacs.d be read-only for a specific reason, or your disk is full, etc. Thus, the IDO raises an error that prevents emacs from closing.

If you are not using an IDO, try removing such lines from your .emacs:

 (require 'ido) (ido-mode t) 
+3
source share

If you used emacs as another user, such as root, it is possible that the .ido.last file is owned by root, and therefore you are not allowed to delete or save it.

When you get the "buffer.ido.last modified" -question, just delete the .ido.last file before saying "Yes" (if you use emacs inside the shell, just Cz, delete the file and then resume using%). Then the .ido.last file will be written to disk with you as the owner.

+5
source share

As Jerome Radix said, IDO gives this error when the ido.last file cannot be saved, and the error prevents emacs from closing.

The default location for the IDO to save the file is in the ~/.emacs.d , but this can be overridden by setting the variable ido-save-directory-list-file . This means that you must check the value of this variable (for example, Mx describe-variable ) to see where the IDO is trying to save the file and find out why it cannot save the file.

Possible reasons:

  • The directory or file is read-only.
  • The directory does not exist. IDO will not create a directory for you.
  • The directory or file belongs to another user.
  • The disk is full.
0
source share

Add this code (for example, to your .emacs.el , init.el , etc.) to fix the ido problem preventing emacs from exiting when the ido.last file ido.last not writable:

 (defun ido-kill-emacs-hook () (ignore-errors (ido-save-history))) 
0
source share

All Articles