我只是在试用emacs (来自vim)。
$ emacs --version
GNU Emacs 27.2
Copyright (C) 2021 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ cat ~/.emacs.d/init.el
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(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.
)我已经运行了M-x package-refresh-contents多次,但仍然,许多软件包,我想要安装没有列出。例如,走模式

知道我在哪里搞砸了吗?谢谢!
编辑
我刚试了太空地图,我想要的包裹出现在清单上.
发布于 2021-09-05 10:50:31
根据您的描述,MELPA包似乎根本没有加载。
因此,首先,检查什么C-h v package-archives输出。它在返回列表中输出“melpa”吗?
您还可以运行M-x package-list-packages,并在列出的结果中查看是否有任何melpa存档包。
在我的配置中,我以这种方式显式地设置了包存档:
(require 'package)
(setq package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("gnu-devel" . "https://elpa.gnu.org/devel/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")
("melpa" . "https://melpa.org/packages/")))同时,自从Emacs 27.1 在你的init文件中。
因此,您应该能够安全地删除(package-initialize)调用或有条件地使用它,例如:
(when (< emacs-major-version 27)
(package-initialize))https://stackoverflow.com/questions/69058138
复制相似问题