emacs 26.0.50 list-package error'Invalid version list'

时间:2017-02-24 17:39:19

标签: emacs elisp

我在OS X上使用emacs版本26.0.50,通过macports安装。这是我正在使用的emacs-app-devel端口。

每当我尝试使用M-x list-packages获取安装包的列表时,我都会收到错误:

无效的版本列表'(8 6 -4)'

并且功能刚刚死亡,不会继续。

这有点令人沮丧,因为运行M-x list-packages适用于我在命令行上运行的macports安装的其他emacs版本25.1.1。

以下是我的.emacs文件中包含list-packages使用的包信息的部分:

;;;Package Install
(require 'package)
(add-to-list 'package-archives
    '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
         '("melpa" . "http://melpa.org/packages/"))
(when (< emacs-major-version 24)
 (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)

与其他有效的其他emacs版本完全相同。

1 个答案:

答案 0 :(得分:0)

我也在mac上运行emacs 25。通过包文件安装它。

这是我的init.el文件。我也是emacs的新手,但您可以将此文件与您的文件进行比较,希望您能找到遗失的内容。

;;led packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.


(load-theme 'monokai t)
(setq frame-title-format "emacs")

(menu-bar-mode -1)
(tool-bar-mode -1)

(scroll-bar-mode -1)
(set-default 'cursor-type 'hbar)

(column-number-mode)

(show-paren-mode)

(global-hl-line-mode)

(winner-mode t)

(windmove-default-keybindings)

(require 'package)

(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/")
             t)

(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/")
             t)

(package-initialize)

(global-set-key (kbd "M-x") 'smex)

(ido-mode t)

(setq ido-enable-flex-matching t)

(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)

(ac-config-default)

(nlinum-mode)

(autopair-global-mode)

(global-undo-tree-mode)

(global-set-key (kbd "M-/") 'undo-tree-visualize)

(global-set-key (kbd "C-M-z") 'Switch-Window)

(global-set-key (kbd "C->") 'ace-jump-mode)

(require 'auto-complete)

(global-auto-complete-mode t)

(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
    (powerline ## powershell minimal-theme minimap elpy auto-complete yari yaml-mode yagist xref-js2 whole-line-or-region whitespace-cleanup-mode wgre\
p-ag vc-darcs unfill tidy textile-mode tagedit switch-window sql-indent smex smarty-mode slime-company skewer-less session scss-mode scratch sass-mode\
 ruby-hash-syntax rspec-mode robe rinari regex-tool redshank rainbow-mode rainbow-delimiters python-mode projectile-rails project-local-variables powe\
rline-evil pip-requirements php-mode paredit-everywhere page-break-lines osx-location origami org-pomodoro org-mac-iCal org-fstree org-evil org-clipli\
nk nlinum mwe-log-commands multiple-cursors move-dup monokai-theme mmm-mode markdown-mode magit-gh-pulls lua-mode lively less-css-mode ledger-mode jso\
n-mode js-comint jedi ipretty intero indent-guide immortal-scratch icicles ibuffer-vc htmlize hl-sexp hippie-expand-slime hindent highlight-symbol hig\
hlight-quoted highlight-escape-sequences hayoo guide-key grab-mac-link goto-gem gnuplot gitignore-mode github-issues github-clone gitconfig-mode git-t\
imemachine git-messenger git-blamed fullframe flymake-python-pyflakes flycheck-pyflakes flycheck-package flycheck-ledger flycheck-elm flycheck-clojure\
 find-file-in-repository fill-column-indicator expand-region exec-path-from-shell erlang elm-mode elisp-slime-nav elein dsvn django-snippets django-mo\
de django-manage disable-mouse dired-sort dired+ diminish diff-hl default-text-scale darcsum csv-nav csv-mode css-eldoc crontab-mode counsel company-q\
uickhelp company-anaconda color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized color-theme-monokai coffee-mode cljsbuild-mode cl-lib-highlig\
ht cask-mode bundler bug-reference-github browse-kill-ring browse-at-remote avy autopair auto-compile anzu airline-themes aggressive-indent ag))))
(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.
 )

(global-set-key (kbd "C-}") 'mc/mark-next-like-this)

(global-set-key (kbd "C-{") 'mc/mark-previous-like-this)

(powerline-center-theme)