Problem
I've recently switched to NixOS and I'm having a couple of problems with my init.el. One I think is NixOS related and so I won't elaborate here, but I can't think of any NixOS component to this one.
When I start emacs (25.3) it tells me it can't load markdown. Starting with debug-init shows the following:
Debugger entered--Lisp error: (file-error "https://melpa.org/packages/markdown-mode-20171021.1714.el" "Not found")
signal(file-error ("https://melpa.org/packages/markdown-mode-20171021.1714.el" "Not found"))
package-install-from-archive([cl-struct-package-desc markdown-mode (20171021 1714) "Major mode for Markdown-formatted text" ((emacs (24)) (cl-lib (0 5))) single "melpa" nil ((:commit . "ef6b4d9def67051f3b8cbd147b09bfaa2f7f6cdb") (:url . "https://jblevins.org/projects/markdown-mode/") (:keywords "markdown" "github flavored markdown" "itex")) nil])
mapc(package-install-from-archive ([cl-struct-package-desc markdown-mode (20171021 1714) "Major mode for Markdown-formatted text" ((emacs (24)) (cl-lib (0 5))) single "melpa" nil ((:commit . "ef6b4d9def67051f3b8cbd147b09bfaa2f7f6cdb") (:url . "https://jblevins.org/projects/markdown-mode/") (:keywords "markdown" "github flavored markdown" "itex")) nil]))
package-download-transaction(([cl-struct-package-desc markdown-mode (20171021 1714) "Major mode for Markdown-formatted text" ((emacs (24)) (cl-lib (0 5))) single "melpa" nil ((:commit . "ef6b4d9def67051f3b8cbd147b09bfaa2f7f6cdb") (:url . "https://jblevins.org/projects/markdown-mode/") (:keywords "markdown" "github flavored markdown" "itex")) nil]))
package-install(markdown-mode)
use-package-ensure-elpa(markdown-mode t nil :ensure)
eval-buffer(#<buffer *load*> nil "/home/garry/.emacs.d/init.el" nil t) ; Reading at buffer position 3825
load-with-code-conversion("/home/garry/.emacs.d/init.el" "/home/garry/.emacs.d/init.el" t t)
load("/home/garry/.emacs.d/init" t t)
#[0 "\205\266 \306=\203\307\310Q\202? \311=\204\307\312Q\202?\313\307\314\315#\203*\316\202?\313\307\314\317#\203>\320\321\322!D\nB\323\202?\316\324\325\324\211#\210\324=\203e\326\327\330\307\331Q!\"\325\324\211#\210\324=\203d\210\203\247\332!\333\232\203\247\334!\211\335P\336!\203\201\211\202\214\336!\203\213\202\214\314\262\203\245\337\"\203\243\340\341#\210\342\343!\210\266\f?\205\264\314\325\344\324\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 format-message "`_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]()
command-line()
normal-top-level()
This suggests to me that emacs might somehow be looking for the wrong location on melpa, since markdown-mode-20171021.1714
doesn't seem to exist there.
What I've tried
I though of deleting all trace of markdown-mode from my .emacs.d/elpa
directory but I don't seem to have anything in there anyway. I've also tried installing markdown-mode system wide but nix doesn't seem to have a package for it.
Question
Is there any way to force emacs to look for the markdown-mode that is current on melpa, or otherwise get it installed? My init.el
has been in its current state (or close to it) for a while without many problems.
.emacs/elpa
, it's actually trying to download it from the internet. What happens if you try toM-x list-packages
, and then pressi
onmarkdown-mode
and then pressx
?use-package-ensure-elpa
is that it has to install the package, if it isn't already present in the system. If you are sure there weren't connectivity issues, it might well be a bug in MELPA code, where this function doesn't actually do what it's supposed to.