All notes
QuickReferenc

Packages

Installation

Ergoemacs.


;; By convention, the dir ~/.emacs.d/lisp/ is for packages you manually installed.
(add-to-list 'load-path "~/.emacs.d/lisp/")

;; load the packaged named xyz.
(load "xyz") ;; best not to include the ending “.el” or “.elc”

;; setup files ending in “.js” to open in js2-mode
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
M-x byte-compile-file.

Compile multiple files: In dired, press m to mark them (press u to unmark), then press B (diredp-byte-compile-this-file).

Melpa

ergoemacs.



(when (>= emacs-major-version 24)
  (require 'package)
  (add-to-list
   'package-archives
   '("melpa" . "http://melpa.org/packages/")
   t)
  (package-initialize))

;;;

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

New packages are installed at ~/.emacs.d/elpa/.

M-x list-packages
    i: mark for installation.
    d: mark for deletion.
    u: unmark.
    U: mark for update.
    x: execute.
    r: refresh list.

variables:
    package-enable-at-startup. By default, this is t (true).
    package-load-list. This determines which packages should be loaded at start-up.