4

I use Emacs 23 on my system. I received a file from a colleague (who has a different Linux distro) to add to the /usr/share/emacs/site-lisp/ directory.

As I worked to do this, I noticed another, similarly-named, directory: /usr/share/emacs23/site-lisp/. When viewing their contents, I notice that they are not identical.

Is this common with all Emacs configurations on all distros? Are there distinct purposes for when I should add into one over the other? Which one? How do I know?

In short, what is the difference between these 2 directories?

3
  • I'm assuming you meant site-lisp. I've never heard of an Emacs with a site-list directory.
    – cjm
    Jan 6, 2012 at 23:01
  • I don't have emacs installed, but I'd bet that /usr/share/emacs is a symlink that gets updated on package upgrades to point to the most recent version (emacs23, in this case).
    – Kevin
    Jan 6, 2012 at 23:07
  • @Kevin No, it's not a symlink. cjm has it right. Jan 6, 2012 at 23:29

2 Answers 2

5

It's possible to have multiple versions of Emacs installed on the same machine. Only Emacs 23 would load files from /usr/share/emacs23/site-lisp/. All versions of Emacs would load files from /usr/share/emacs/site-lisp/.

Generally, you just use /usr/share/emacs/site-lisp/, unless there's some reason the code applies only to a particular version of Emacs.

To see where your Emacs is loading code from, type Control+h    v load-path Enter.

0
0

In addition to cjm's answer, be aware that sometimes /usr/share/emacs/site-lisp/ might contain files that will shadow the files in a particular emacs installation. I was mad at an error of Emacs25 not being able to find the function ispell-hunspell-add-multi-dic, until I ran list-load-path-shadows and found out that the ispell.el file is being shadowed by the ispell.el file in /usr/share/emacs/site-lisp/ which is old and doesn't contain the function!

You must log in to answer this question.

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