ubuntu - 符号作为变量的值是 void : debian-emacs-flavor when running ispell on tex file

标签 ubuntu emacs debian latex

当我尝试运行 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)

最佳答案

debian-emacs-flavor显然是 Debian package maintainers 设置的变量它不会存在于其他 Emacs 发行版中,但我会从您的错误中假设 emacs-goodies.el 中的某些内容需要它。两个解决方案:丑陋的黑客将以下内容添加到您的 .emacs 以提供变量。

 (defconst debian-emacs-flavor 'emacs23
   "A symbol representing the particular debian flavor of emacs running.
 Something like 'emacs20, 'xemacs20, etc.")

这可能会解决眼前的问题,同时冒着给 emacs-goodies.el 包的其他部分引入新问题的风险。

更好的解决方案是不要混合 Ubuntu 和 Debian 软件包,而只需从 Ubuntu 存储库或上游源安装您需要的软件包。更多的工作,但不太可能在 future 引起类似的冲突。

关于ubuntu - 符号作为变量的值是 void : debian-emacs-flavor when running ispell on tex file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7311268/

相关文章:

ubuntu - spl-token : error while loading shared libraries: libssl. so.1.1:无法打开共享对象文件:没有这样的文件或目录

php - $_SERVER ['HOME' ] 没有显示正确的值 nginx ubuntu

python - crontab 找不到 python 模块

emacs 256 色支持

python - "No matching distribution found for sqlite3"与 python3 和 virtualenv

ubuntu - Docker 上的 Cassandra - nodetool 连接问题

emacs - MELPA 中列出的 Rust 模式,但未在包安装中找到

javascript - 在 Emacs 中编辑文件后 ReactJS 本地服务器崩溃,即使没有保存

php - session_start 似乎很慢(但只是有时)

linux - 在 debian intel 5300 agn 上创建接入点