The minimum .emacs for debug purpose

  |   Source

I've installed more than 100 emacs plugins.

Here is my minimum .emacs to test plugins,

(show-paren-mode 1)
(eval-when-compile (require 'cl))

;; test elisps download from internet here
(setq test-elisp-dir "~/test-elisp/")
(if (not (file-exists-p (expand-file-name test-elisp-dir)))
    (make-directory (expand-file-name test-elisp-dir)))

(setq load-path
        (loop for dir in (directory-files test-elisp-dir)
              unless (string-match "^\\." dir)
              collecting (expand-file-name (concat test-elisp-dir dir)))

;; package repositories
(require 'package)
(add-to-list 'package-archives '("marmalade" .  "") t)
(add-to-list 'package-archives '("melpa" . "") t)

;; ==== put your code below this line!

The code is straight forward. I scan any sub-directories in ~/test-elisp and add them into load-path.

I've uploaded the .emacs to Dropbox, so you can use one bash liner to download it:

cd ~/;wget;mkdir -p ~/test-elisp;
Comments powered by Disqus