Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.emacs.d and site-lisp directory

Tags:

emacs

elisp

I have the following two questions about emacs

  1. In my .emacs.d directory there is an empty directory called auto-save-list. What is that for ?

  2. I have create a elisp directory in my home directory on my linux machine where i place .el files. In my .emacs i have (add-to-list 'load-path "~/elisp") Now,I have heard of .emacs.d/site-lisp directory. Im confused about the difference between site-lisp and my own elisp directory. Can someone please explain.

Thank You

like image 662
jimcgh Avatar asked May 27 '12 20:05

jimcgh


1 Answers

You can read about auto-save-list here:

C-hig (emacs) Recover RET

Emacs records information about interrupted sessions for later recovery in files named `.saves-PID-HOSTNAME' in the directory `~/.emacs.d/auto-save-list/'. This directory is determined by the variable `auto-save-list-file-prefix'. If you set `auto-save-list-file-prefix' to `nil', sessions are not recorded for recovery.

You may be slightly confused about site-lisp -- the only standard directory by that name is not intended to live under a user's home directory (typically it lives at /usr/local/share/emacs/site-lisp), and the only special thing about it is that Emacs will include it in the load-path list by default.

The intention, as the name suggests, is that libraries which should be available to all users on a given machine can be placed in that directory.

By contrast, the ~/elisp directory you've created will not be available to anyone else.

Read more here:

C-hig (emacs) Init File RET

like image 58
phils Avatar answered Sep 21 '22 06:09

phils