Domanda

the following is output from a terminal session demonstrating that I, hopefully actually set this up right.

~ $cat .emacs
(require 'package)
(custom-set-variables
 ;;lots of comments generated by computer
 '(package-archives (quote(("gnu" . "http://elpa.gnu.org/packages") 
                           ("marmalade" . "http://marmalade-repo.org/packages") 
                           ("melpa" . "http://melpa.milkbox.net/packages/") 
                           ("org" . "http://orgmode.org/elpa")))))

(custom-set-faces
 ;;again lots of comments added by the computer
)

(add-to-list 'load-path "/usr/share/emacs/24.3/site-lisp/mu4e")
~ $ ls /usr/share/emacs/24.3/site-lisp/mu43
#there are a lot of files here, but I am only going to show 2 right now
mu4e.elc
mu4e.el

... and yet emacs M-x mu4e returns [no match]. I have checked to load-path variable, and it is there. What am I doing wrong?

È stato utile?

Soluzione

You need to add one more thing so that mu4e is loaded. There are two different ways to do this.

First, you could add (require 'mu4e) after you've added the path to your load-path. This will immediately load mu4e.

Alternatively, you could add the following:

(autoload 'mu4e "mu4e" "Launch mu4e and show the main window" t)

This will tell Emacs to load it lazily (i.e. not until you actually use it). Autoloading is documented here. (This is essentially done for you for packages installed via package.el - it's the same mechanism, you just don't need to specify it yourself).

The benefit of autoloads is that Emacs's initial startup is faster, since rather than loading every package right away it waits until you use them.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top