【发布时间】:2020-05-09 07:33:28
【问题描述】:
当我尝试运行 ispell 时,我不断收到此错误。我不确定问题出在哪里,但我最近(在 Ubuntu 10.04 上)从 23.1 更新到最新的 emacs 23.3。我刚刚将 emacs-goodies-el 从 debian 包维护者复制到了我放在主文件夹中的 site-lisp。如果我从旧版本中未编辑的文件开始或创建新文件,它似乎运行得很好。如果我打开我之前正在编辑的 tex 文件,则会将其关闭。然后我尝试打开的任何文件在下面都有相同的错误。在我的另一台具有类似设置的计算机上,我用相同的 .emacs 做了同样的事情,它没有问题。我可以很好地打开这些相同的 tex 文件。是否在某个地方存储了一些这样的信息或关于在哪里查找的建议。如果我打开一个新文件,它会显示:
Enabling Flyspell mode gave an error
然后运行 M-x ispell 给出:
not: Symbol's value as variable is void: debian-emacs-flavor
这是错误。奇怪的是,现在 flyspell/ispell 在我之前遇到问题的文件中运行良好,但如果我创建新文件,它似乎不起作用。如果我在 tex 模式下制作新文件,我似乎没有问题。另外我应该注意,当我使用latex/tex 时,我通常运行emacs -q --load ~\.emacstex。我有一种感觉,也许这个变量是在 default.el 中设置的(不确定)??这是错误:
Debugger entered--Lisp error: (void-variable debian-emacs-flavor)
(member debian-emacs-flavor (quote (emacs20 emacs21)))
(not (member debian-emacs-flavor (quote ...)))
(if (not (member debian-emacs-flavor ...)) (delete-process ispell-process) (process-send-eof ispell-process) (if (eq ... ...) (ispell-accept-output 1)) (if (eq ... ...) (kill-process ispell-process)) (while (not ...) (if ... ... ...)))
ispell-delete-ispell-process()
(if ispell-async-processp (ispell-delete-ispell-process) (ispell-send-string "\n") (kill-buffer ispell-output-buffer) (kill-buffer ispell-session-buffer) (setq ispell-output-buffer nil ispell-session-buffer nil))
(if (not (and ispell-process ...)) (or no-error (error "There is no ispell process running!")) (if ispell-async-processp (ispell-delete-ispell-process) (ispell-send-string "\n") (kill-buffer ispell-output-buffer) (kill-buffer ispell-session-buffer) (setq ispell-output-buffer nil ispell-session-buffer nil)) (setq ispell-process nil) (message "Ispell process killed") nil)
ispell-kill-ispell(t)
(if (and ispell-buffer-local-name (not ...)) (ispell-kill-ispell t))
ispell-buffer-local-words()
ispell-accept-buffer-local-defs()
(if (not recheckp) (ispell-accept-buffer-local-defs))
ispell-region(1 24)
ispell-buffer()
(if (and (boundp ...) transient-mark-mode (boundp ...) mark-active) (ispell-region (region-beginning) (region-end)) (ispell-buffer))
ispell()
call-interactively(ispell t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
【问题讨论】:
-
执行
M-x toggle-debug-on-error,然后再次执行M-x ispell。 Emacs 会给你一个*Backtrace*错误缓冲区。粘贴*Backtrace*缓冲区的内容,以便我们这些没有得到您确切错误的人可以帮助您。 -
您究竟是如何升级到 23.3 的? Ubuntu 10.04 仍然是正式的 23.1。您是否创建了自己的构建?还是从 PPA 安装?
-
@tripleee-是的,我在我的主目录中创建了自己的构建。然后只需复制 emacs-goodies-el 文件即可。在我的其他自定义文件中添加到 site-lisp 文件夹。在我的 .emacstex 文件中使用 Tyler 答案似乎可以使一切正常。我一直想为所有模式创建一个 .emacs 文件。我最初设置它时有不同的,因为当我运行 emacs 时,我只希望它记住 windows,而当我使用乳胶模式时不记得什么。重新打开窗户很好。所有其他时间通常在打开文件时。我不想加载所有这些 tex 窗口。
-
@J Spen - 为一个版本的 Emacs 打包的扩展与另一个版本混合可能会给您带来更多问题。将打包的 Emacs 与您自己安装的扩展一起使用通常没问题。但是 emacs-goodies 假定您已经安装了“Debian 化”版本的 Emacs,而您不再是这种情况!
-
您可以安装适当的 Debianized 版本,试试 naquadah PPA emacs.naquadah.org(尽管它们可能已经在 emacs24 上)