I am using Emacs 24.5.1 and I seem to have a problem loading the web-mode package using use-package. I managed to narrow it down to the following .emacs file:

(require 'package)
(setq package-enable-at-startup nil)
(mapc (lambda(p) (add-to-list 'package-archives p t))
      '(("marmalade" . "http://marmalade-repo.org/packages/")
        ("melpa" . "http://melpa.org/packages/")
        ("org" . "http://orgmode.org/elpa/"))) 

(unless (package-installed-p 'use-package)
  (package-install 'use-package))
(require 'use-package)

(use-package web-mode
     (setq web-mode-enable-current-element-highlight t)
     (setq web-mode-enable-current-column-highlight t)
     (add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
     (defun my-web-mode-hook ()
       "Hooks for Web mode."
       (setq web-mode-markup-indent-offset 2)
       (setq web-mode-css-indent-offset 2)
       (setq web-mode-code-indent-offset 2)
       (setq web-mode-style-padding 1)
       (setq web-mode-script-padding 1)
       (setq web-mode-block-padding 0)
     (add-hook 'web-mode-hook  'my-web-mode-hook)
     (eval-after-load "web-mode"
       '(set-face-background 'web-mode-current-element-highlight-face "color-88"))
   :ensure t)

When I start emacs with the above .emacs I get the message:

Warning (initialization): An error occurred while loading `/home/mperdikeas/.emacs':

Symbol's value as variable is void: <html>

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

The backtrace with --debug-init is not much informative (to me at least):

Debugger entered--Lisp error: (void-variable <html>)
byte-code(\210  \210\n\210
\210\210\21\210        \210\n\210\210\f\210
\210\210\210\210\210\210\210\210\207" [<html> <head> <script type= >location\.href= </script> </head> <body> Authentication is required\. Click <a href= >here</a> to open the authentication page\. </body> </html>] 1)
require(web-mode nil noerror)
(not (require (quote web-mode) nil (quote noerror)))
(if (not (require (quote web-mode) nil (quote noerror))) (ignore (message (format "Could not load %s" (quote web-mode)))))
(progn (condition-case err (progn (setq web-mode-enable-current-element- highlight t) (setq web-mode-enable-current-column-highlight t) (add-to-list   (quote auto-mode-alist) (quote ("\\.html\\'" . web-mode))) (defalias (quote my- web-mode-hook) (function (lambda nil "Hooks for Web mode." (setq web-mode- markup-indent-offset 2) (setq web-mode-css-indent-offset 2) (setq web-mode-code- indent-offset 2) (setq web-mode-style-padding 1) (setq web-mode-script-padding  1) (setq web-mode-block-padding 0)))) (add-hook (quote web-mode-hook) (quote my- web-mode-hook)) (eval-after-load "web-mode" (function (lambda nil (set-face- background (quote web-mode-current-element-highlight-face) "color-88")))))  ((debug error) (ignore (display-warning (quote use-package) (format "%s %s: %s"  "web-mode" ":init" (error-message-string err)) :error)))) (if (not (require  (quote web-mode) nil (quote noerror))) (ignore (message (format "Could not load   %s" (quote web-mode))))))
eval-buffer(#<buffer  *load*> nil "/home/mperdikeas/.emacs" nil t)  ; Reading at buffer position 1250
  load-with-code-conversion("/home/mperdikeas/.emacs"   "/home/mperdikeas/.emacs" t t)
  load("~/.emacs" t t)
  #[0 \205\262  \306=\203\30\310Q\202;  \311=\204\30\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\ nB\321\202;\316\322\323\322\211#\210
                   #\210\340\341!\210\266\f?\205\260\314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()

1 Answer 1


It appears that the installation of web-mode has failed. Instead of getting an elisp file, you got a user oriented HTML file telling you that you are not authorized to get the file. Try to download the file manually in order to understand what happened and why.

  • On closer inspection, I suspect a bug in use-package. It appears to not have detected the failure to download web-mode, instead happily storing the error message resulting from the failed download as if it were an actual elisp file. Commented Feb 24, 2016 at 16:50
  • After manually installing web-mode (from list-packages) it now works. Commented Feb 24, 2016 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.