Ubuntu 符号';作为变量的s值为void:debian emacs在tex文件上运行ispell时的味道

Ubuntu 符号';作为变量的s值为void:debian emacs在tex文件上运行ispell时的味道,ubuntu,emacs,debian,latex,Ubuntu,Emacs,Debian,Latex,当我尝试运行ispell时,不断出现此错误。我不确定这个问题是从哪里来的,但我最近(在Ubuntu 10.04上)从23.1更新到了最新的emacs 23.3。我刚刚将emacs goodies el从debian软件包维护器复制到我的网站lisp,并将其放在我的主文件夹中。如果我从没有在旧版本中编辑的文件开始,或者创建新文件,那么运行起来似乎完全正常。如果我打开我之前编辑的tex文件,它就会被丢弃。然后,我尝试打开的任何文件都会出现与下面相同的错误。在另一台设置类似的计算机上,我用相同的.em

当我尝试运行ispell时,不断出现此错误。我不确定这个问题是从哪里来的,但我最近(在Ubuntu 10.04上)从23.1更新到了最新的emacs 23.3。我刚刚将emacs goodies el从debian软件包维护器复制到我的网站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
显然是由设置的变量,它在其他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存储库或上游源安装所需的软件包。更多的工作,但不太可能在将来引起类似的冲突。

debian emacs flavor
显然是由设置的变量,它不会存在于其他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存储库或上游源安装所需的软件包。更多的工作,但将来不太可能引起类似的冲突。

缺少
debian emacs flavor
变量的定义几乎肯定是由于在启动时使用
emacs-q
造成的。避免加载不必要的积垢的习惯方法是将
.emacs
中的内容设置为有条件的,可能是这样的

(eval-after-load 'tex-mode '(load-file (expand-file-name "~/.emacstex")))
这样,只有在您实际以TeX模式(或者我认为是派生模式)打开文件时,才会加载这些自定义设置。当您想要编辑TeX文件时,您必须做一些补充,以避免从
.emacs
加载不必要的内容。(无论如何,不建议退出并重新启动Emacs,因为您会丢失压井环历史记录等)

关于Flyspell如何与Ubuntu的Emacs集成的更多背景信息,请参见


编辑:仔细阅读您的问题后进行重大重构。

缺少
debian emacs flavor
变量的定义几乎可以肯定是由于您在启动时使用了
emacs-q
。避免加载不必要的积垢的习惯方法是将
.emacs
中的内容设置为有条件的,可能是这样的

(eval-after-load 'tex-mode '(load-file (expand-file-name "~/.emacstex")))
这样,只有在您实际以TeX模式(或者我认为是派生模式)打开文件时,才会加载这些自定义设置。当您想要编辑TeX文件时,您必须做一些补充,以避免从
.emacs
加载不必要的内容。(无论如何,不建议退出并重新启动Emacs,因为您会丢失压井环历史记录等)

关于Flyspell如何与Ubuntu的Emacs集成的更多背景信息,请参见


编辑:仔细阅读您的问题后进行重大重构。

执行
M-x切换错误调试
,然后再次执行
M-x ispell
。Emacs将为您提供错误的
*回溯*
缓冲区。粘贴
*Backtrace*
缓冲区的内容,以便我们这些没有收到确切错误的人能够帮助您。您到底是如何升级到23.3的?Ubuntu 10.04仍然是23.1版本的官方版本。你创建了自己的版本吗?还是从PPA安装?@tripleee是的,我在我的主目录中创建了自己的版本。然后复制了emacs goodies el文件。在“我的其他自定义文件”中添加到站点lisp文件夹。在我的.emacstex文件中使用Tyler answer似乎可以使一切正常工作。我一直想为所有模式创建一个.emacs文件。我最初设置它时,我有不同的设置,因为当我运行emacs时,我只想让它记住windows,而不是当我使用latex模式时。重新打开窗户真是太好了。所有其他时间通常是在打开文件时。我不想加载所有这些tex窗口。@J Spen-将一个版本的Emacs打包的扩展与另一个版本的Emacs混合可能会给您带来更多问题。将打包的Emacs与您自己安装的扩展一起使用通常是可以的。但是emacs goodies假设您已经安装了一个“Debianized”版本的emacs,这对您来说已经不再适用了!您可以安装正确的Debianized版本,尝试naquadah PPA(尽管它们可能已经在emacs24上)执行
M-x切换错误调试
,然后再次执行
M-x ispell
。Emacs将为您提供错误的
*回溯*
缓冲区。帕