How to install the Emacs plugin (many times it is an .el file) on a Windows platform?

I am new to Emacs. I found that many emacs plugins are released as an .el file. I am not sure how to install them. Can I just put them in the emacs installation directory?

+51
plugins installation emacs
Jun 19 '11 at 4:00
source share
4 answers

Having placed it, say myplugin.el in your ~/.emacs.d/ , add the following to your .emacs file:

 (add-to-list 'load-path "~/.emacs.d/") (load "myplugin.el") 

In addition, in many cases, for the second line, you will need the following:

 (require 'myplugin) 

In any case, you should consult the documentation of the package you are trying to install on which you should use.

If you do not know where your directory ~ is located, you can see it by typing Cx d ~/ and pressing Enter .

+72
Jun 19 '11 at 7:30
source share

As already mentioned, you need to specify the location of the file in the Emacs download path.

Read the comments at the top of the file to see if it has any specific installation or use instructions. Authors often provide this information, and there is no one correct way to do this, so it’s wise to watch.

If this is not the case, if the file contains the line (provide 'some-name) (usually at the end of the file), you can use (require 'some-name) to load it.

You can also ask for bytes to compile the library for speed (but that's another question).

+3
Jun 20 2018-11-11T00:
source share

Many times, the emacs plugin will consist of a directory of elisp files that must be accessible from the download path. An easy way to ensure that all individual elisp files as well as subdirectories of elisp files are included in the download path and available to do something similar to the following:

  • Create a directory named ~ / .emacs.d / site- lisp.
  • Install all individual elisp files in the ~ / .emacs.d / site-lisp directory.
  • Install all packages that consist of several elisp files in a subdirectory in the ~ / .emacs.d / site-lisp directory.
  • Add the following code to your ~ / .emacs file to make sure Emacs β€œsees” all the elisp files you 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 ensures that all elisp files that are located either in the ~ / .emacs.d / site-lisp directory or in a subdirectory in this directory are accessible.

+1
Jun 20 2018-11-18T00:
source share

Some additional information: MATLAB.el comes from http://matlab-emacs.sourceforge.net/

In windows, use the boot path, which looks like this:

 (add-to-list 'load-path' "C:\\Dropbox\\Portable\\emacs\\matlab-emacs") 

If you need FULL MATLAB functionality, you should use:

 ;;MATLAB Mode: (add-to-list 'load-path' "C:\\Dropbox\\Portable\\emacs\\matlab-emacs") (require 'matlab-load) 

if you just 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) 
0
Apr 08 '15 at 5:01
source share



All Articles