Question

Since I've started using git to manage my .emacs file, I've found it useful to keep everything in my ~/.emacs.d direcory. I would like to have eshell, therefore, read ~/.emacs/eshell.el on startup instead of the default ~/.eshell .

I thought this would be simple enough, just change the eshell-directory-name variable to point where I want:

(setq eshell-directory-name '("~/.emacs.d/eshell"))

However, when I do that, I get the error:

call-interactively: Autoloading failed to define function eshell

and eshell fails to load.

What is the correct way to change this setting?

Était-ce utile?

La solution 2

So I figured this out: the error message had nothing to do with the line in the config file, but everything to do with the name of the config file instead.

I separated out all of my custom eshell configurations into a file called eshell.el This made emacs skip the eshel.elc from my instillation on startup, because emacs looks in the user's custom directory first and uses the file that is there instead if it has the same name. So changing the filename to my_ehsell.el magically fixed this problem.

As to the proper way to define that variable, that is best answered in this question: Difference between `set`, `setq`, and `setf` in Common Lisp?

Autres conseils

Try:

M-x customize-variable RET eshell-directory-name RET

OR

(setq eshell-directory-name "~/.emacs.d/eshell")
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top