.emacs still uses old-style (pre MELPA, pre package.el) initializations.
Current (this works)
web-mode as a concrete example.
If I manually download
web-mode.el and put it in
~/elisp, then start Emacs (25) with the
(package-initialize) ; Irrelevant here. Added by Emacs. (setq load-path (cons "~/elisp" load-path)) (require 'web-mode) (set-face-attribute 'web-mode-css-at-rule-face nil :foreground "magenta red")
all is well.
I'd like to change this
.emacs to be able to use any machine+account without having to install manually an
~/elisp on each machine/account.
MELPA + package.el attempt (this doesn't work)
My attempt is:
(require 'package) (add-to-list 'package-archives '("MELPA Stable" . "https://stable.melpa.org/packages/") t) (package-initialize) (custom-set-variables '(package-selected-packages (quote (web-mode)))) (set-face-attribute 'web-mode-css-at-rule-face nil :foreground "magenta red")
but this fails with
error: Invalid face, web-mode-css-at-rule-face
What am I doing wrong?
When I run
package-list-packages I see
and so it appears that web-mode is installed.
I now have the impression from phil's comment that using package.el + MELPA may not actually spare me from having to download and install elisp packages manually. Please confirm one way or the other.
It turns out that this change cannot be completely made. Too many packages are not on MELPA.