[ACCEPTED]-How to install a Emacs plugin (many times it's a .el file) on Windows platform?-installation
After placing it, say myplugin.el
to your ~/.emacs.d/
directory, add 8 the following in your .emacs
file:
(add-to-list 'load-path "~/.emacs.d/")
(load "myplugin.el")
Also, in many 7 cases you would need the following instead 6 of the second line:
(require 'myplugin)
In any case, you should 5 consult the documentation of the package 4 you are trying to install on which one you 3 should use.
If you are unsure where your 2 ~
directory is, you may see it by typing 1 C-x d ~/
and pressing Enter
.
As already stated, you'll need the location 11 of the file to be in Emacs' load path.
Read 10 the comments at the top of the file to see 9 if it has any particular installation or 8 usage instructions. Authors often provide 7 this information, and there isn't one single 6 correct way to do it, so it's sensible to 5 look.
Failing that, if the file contains 4 a (provide 'some-name)
line (typically at the end of the file), then 3 you would be expected to use (require 'some-name)
to load it.
You 2 may also wish to byte-compile the library 1 for speed (but that's a different question).
Many times, an emacs plugin will consist 14 of a directory of elisp files that need 13 to be accessible from the load path. A simple 12 way to ensure that all individual elisp 11 files as well as subdirectories of elisp 10 files are included in the load path and 9 accessible is to do something similar to 8 the following:
- Create a directory called ~/.emacs.d/site-lisp.
- Install any single elisp files in the ~/.emacs.d/site-lisp directory.
- Install any packages that consist of multiple elisp files in a subdirectory under your ~/.emacs.d/site-lisp directory.
Add the following code to 7 your ~/.emacs file to ensure that Emacs 6 "sees" all the elisp files that you have 5 installed:
(add-to-list 'load-path "~/.emacs.d/site-lisp") (progn (cd "~/.emacs.d/site-lisp") (normal-top-level-add-subdirs-to-load-path))
This will ensure that all elisp 4 files that are located either in either 3 the ~/.emacs.d/site-lisp directory or in 2 a subdirectory under that directory are 1 accessible.
Some supplementary information: MATLAB.el 4 comes from http://matlab-emacs.sourceforge.net/
On windows, use the load path 3 that looks like this:
(add-to-list 'load-path' "C:\\Dropbox\\Portable\\emacs\\matlab-emacs")
If you want FULL MATLAB 2 functionality you should use:
;;MATLAB Mode:
(add-to-list 'load-path' "C:\\Dropbox\\Portable\\emacs\\matlab-emacs")
(require 'matlab-load)
if you just 1 want to edit text files:
;;MATLAB Mode:
(add-to-list 'load-path' "C:\\Dropbox\\Portable\\emacs\\matlab-emacs")
(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t)
(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.