每次打开emacs都提示警告

在deiban10系统下,每次打开emacs27.1都提示:Symbol’s value as variable is void: ispell-menu-map-needed。我没动过ispell的任何设置,这个警告呀如何去掉?

emacs --debug-init

Warning (initialization): An error occurred while loading ‘/home/yinxiuqu/.emacs.d/init.el’:

End of file during parsing: /home/yinxiuqu/.emacs.d/init.el

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.

从调试看,说是我init.el里配置有问题好像。下面是我的配置文件

;; 安装包的源 (require 'package) (add-to-list 'package-archives '(“melpa” . “https://elpa.emacs-china.org/melpa/”) t) (add-to-list 'package-archives '(“gnu” . “https://elpa.emacs-china.org/gnu/”) t) (add-to-list 'package-archives '(“org” . “https://elpa.emacs-china.org/org/”) t) (package-initialize)

(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 '(use-package ## lsp-mode youdao-dictionary))

(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. )

;; 配置conda虚拟环境 (require 'conda) ;; if you want interactive shell support, include: (conda-env-initialize-interactive-shells) ;; if you want eshell support, include: (conda-env-initialize-eshell) ;; if you want auto-activation (see below for details), include: (conda-env-autoactivate-mode t) ;; 指定anaconda的安装目录 ;;(custom-set-variables ;; '(conda-anaconda-home “~/anaconda3/”)) (setq conda-anaconda-home (expand-file-name “~/anaconda3”)) ;; 指定anaconda的配置目录 (setq conda-env-home-directory (expand-file-name “~/anaconda3/”))

;; python路径 ;;(setq python-shell-interpreter “/home/yinxiuqu/anaconda3/envs/quantaxis/bin/python3.8”)

;; 设置环境变量 (setenv “PATH” “/home/yinxiuqu/projects/quantming”) ;; (setenv “HOME” “/home/yinxiuqu/projects/quantming”) ;; (setq default-directory “/home/yinxiuqu/temp”) (setq command-line-default-directory “/home/yinxiuqu/temp”)

;; 设置和系统互相粘贴 (setq x-select-enable-clipboard t)

;; 有道词典Enable Cache (setq url-automatic-caching t) (global-set-key (kbd “C-q”) 'youdao-dictionary-search-at-point+)

;; 禁用\e\e和\C-x\C-u (global-unset-key “\e\e”) (global-unset-key “\C-x\C-u”)

;; eshell自动启用conda虚拟环境 (defun my-python-shell-dir-setup () (let ((process (get-buffer-process (current-buffer)))) (python-shell-send-string my-python-shell-dir-setup-code process) (message “Setup project path”))) (add-hook 'inferior-python-mode-hook 'my-python-shell-dir-setup)

看起来你并没有调试? 你需要按照二楼那样,运行你的emacs,看 error backtrace 来定位问题。

的确是如二楼所说的操作的,只不过把结果复制在上面的帖子上。这是我的运行抓图。sub-buffer里面有错误信息,第二个buffer里面是另一个错误信息。

我emacs 经验很少,我觉得你在minibuffer 里面显示的symbol‘s value is void 不像是你的error所在?(不确定)。 在warning buffer 中,我之前遇到Error 都会直接显示在这里,你这里还没有显示 backtrace,看不出什么来。你或许看看你的配置,一个个comment,看看是配置文件哪个位置出错了?

你显示这个错是说文件没能parse完就结束了,通常是括号没对齐。

Debugger entered--Lisp error: (void-variable OB)
  eval-buffer(#<buffer  *load*> nil "/home/yinxiuqu/.emacs.d/init.el" nil t)  ; Reading at buffer position 955
  load-with-code-conversion("/home/yinxiuqu/.emacs.d/init.el" "/home/yinxiuqu/.emacs.d/init.el" t t)
  load("/home/yinxiuqu/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x157bec26e5cd>) #f(compiled-function () #<bytecode 0x157bec26e59d>) t)
  command-line()
  normal-top-level()

的确少了一个括号,加上后,重新emacs --debug-init 出现以上错误。