1

I am trying to quit emacs with M-x kill-emacs but I get this message: Buffer cache/ido.last modified; kill anyway (y or n). When I choose y I get /Users/a/.emacs.d/cache/: no such directory.

This is stopping me from M-x eval-buffer to install packages with marmalade. How can I fix this?


EDIT

I created a /cache/ directory in /.emacs.d and changed its permissions to 777 and I was able to kill emacs. Can you take a look at these permissions and let me know if I need to make changes?

as-MacBook-Air:.emacs.d a$ ls -la
total 24
drwx------  11 a  staff   374 Dec 18 12:20 .
drwxr-xr-x+ 34 a  staff  1156 Dec 18 12:20 ..
-rw-r--r--   1 a  staff   195 Dec 18 12:20 .smex-items
drwx------   3 a  staff   102 Dec 12 21:04 auto-save-list
drwxr-xr-x  21 a  staff   714 Dec 18 12:20 backups
drwxrwxrwx   2 a  admin    68 Dec 18 12:08 cache
drwxr-xr-x  23 a  staff   782 Dec 18 08:51 elpa
drwx------   4 a  staff   136 Dec 18 08:23 eshell
-rw-r--r--   1 a  staff   195 Dec 18 12:20 places
-rw-r--r--   1 a  staff  1505 Dec 18 12:20 tramp
drwxr-xr-x   4 a  staff   136 Dec 18 09:19 url
10
  • 1
    Create the directory manually. You can also look for the variable where that directory is set (e.g., ido-save-directory-list-file) and change the location if you so prefer. Or disable the ido save.
    – lawlist
    Dec 18, 2013 at 15:30
  • 1
    Here is an example of how to change the location: (setq ido-save-directory-list-file "~/.emacs.d/ido.last")
    – lawlist
    Dec 18, 2013 at 15:41
  • I commented out ;; ido-save-directory-list-file "~/.emacs.d/ido.last" but I still get the same "no such directory" error and emacs does not quit. In your second comment, do I paste (setq ido-save-directory-list-file "~/.emacs.d/ido.last") in .emacs?
    – Zeynel
    Dec 18, 2013 at 16:33
  • 1
    Thanks, please see my edits to the question. I created the /cache directory and changed its permissions and it worked.
    – Zeynel
    Dec 18, 2013 at 17:26
  • 1
    You made a good choice. I spent a few minutes searching ido.el before I posted my comments, but was unable to readily locate the code where the directory cache is specified. If you are interested and have some free time, that would be the place to look to make further configurations of the cache directory. There may be other files that will be stored in that directory, so care would be needed when modifying that location if you so choose. There are a lot of words cache inside ido.el , so searching may take time if you're interested. Since it's working now, you can call it a wrap.
    – lawlist
    Dec 18, 2013 at 17:31

1 Answer 1

0

Use this code to workaround the issue of ido preventing emacs from exiting when the 'ido.last' file is not writable:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .