Set up .scripts/install-emacs.el to load packages from MELPA

This commit is contained in:
Nathan Schneider
2019-11-30 15:23:13 -07:00
parent c602013e3b
commit f05987886c
4 changed files with 23 additions and 16 deletions
+17 -8
View File
@@ -1,6 +1,6 @@
;; GETTING STARTED ;; GETTING STARTED
;; INITIALIZE MELPA PACKAGES ;; INITIALIZE MELPA
;; Keep this on top ;; Keep this on top
;; https://melpa.org/#/getting-started ;; https://melpa.org/#/getting-started
(require 'package) (require 'package)
@@ -12,14 +12,11 @@
;; For important compatibility libraries like cl-lib ;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) (package-initialize)
;; setting the default directory for extra packages ;; setting the default directory for extra packages
(add-to-list 'load-path "~/.emacs.d/lisp/") (add-to-list 'load-path "~/.emacs.d/lisp/")
;; SOME BASIC PREFERENCES ;; SOME BASIC PREFERENCES
;; Eliminates initial splash screen
(setq inhibit-startup-message t
inhibit-startup-echo-area-message t)
;; turns off the menus at top ;; turns off the menus at top
(menu-bar-mode -1) (menu-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
@@ -43,9 +40,7 @@
(autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t) (autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
;; Turn on Flyspell (no need for lazy-mode, it seems; perhaps delete that) ;; Turn on Flyspell
;;(require 'flyspell-lazy)
;;(flyspell-lazy-mode 1)
(dolist (hook '(text-mode-hook)) (dolist (hook '(text-mode-hook))
(add-hook hook (lambda () (add-hook hook (lambda ()
(flyspell-mode 1) (flyspell-mode 1)
@@ -140,3 +135,17 @@
) )
) )
(put 'downcase-region 'disabled nil) (put 'downcase-region 'disabled nil)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
(wc-mode markdown-preview-mode markdown-mode+ markdown-mode pandoc-mode ox-reveal))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
+1 -4
View File
@@ -13,10 +13,7 @@ sudo apt-get -y install xdg-open
# emacs MAKE ARCH-COMPATIBLE # emacs MAKE ARCH-COMPATIBLE
sudo apt-get -y install emacs-gtk sudo apt-get -y install emacs-gtk
sudo apt-get -y install elpa-markdown-mode emacs --script install-emacs.el
mkdir -p ~/.emacs.d/ && mkdir -p ~/.emacs.d/lisp/
cd ~/.emacs.d/lisp/
&& git clone git://github.com/bnbeckwith/wc-mode.git
# pandoc MAKE ARCH-COMPATIBLE # pandoc MAKE ARCH-COMPATIBLE
sudo apt-get -y install pandoc sudo apt-get -y install pandoc
+1 -4
View File
@@ -13,10 +13,7 @@ sudo apt-get -y install xdg-open
# emacs # emacs
sudo apt-get -y install emacs-gtk sudo apt-get -y install emacs-gtk
sudo apt-get -y install elpa-markdown-mode emacs --script install-emacs.el
mkdir -p ~/.emacs.d/ && mkdir -p ~/.emacs.d/lisp/
cd ~/.emacs.d/lisp/
&& git clone git://github.com/bnbeckwith/wc-mode.git
# pandoc # pandoc
sudo apt-get -y install pandoc sudo apt-get -y install pandoc
+4
View File
@@ -0,0 +1,4 @@
;; elisp script for installing emacs packages via MELPA
(package-refresh-contents)
(package-install markdown-mode)
(package-install wc-mode)