auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Getting ChkTeX to work


From: Ralf Angeli
Subject: Re: [AUCTeX] Getting ChkTeX to work
Date: Sat, 27 Mar 2010 15:36:29 +0100

* Siim Sepman (2010-03-26) writes:

> added
> (require 'chktex)
> to the end of my .emacs file after the lines
> (load "auctex.el" nil t t)
> (load "preview-latex.el" nil t t)
>
> Then I realized that ~/.emacs.d/ is not what's meant with "elisp
> directory". I figured that /usr/local/share/emacs/site-lisp/ was the
> right directory, because other .el files were loaded from there. So I
> moved chktex.el to there.

You could also put the file into a directory in your below your home
directory and add that to `load-path' in Emacs, see e.g.
(info "(emacs)Lisp Libraries").

> Then I started getting this error:
> An error has occurred while loading `/home/ssepman/.emacs':
> Symbol's value as variable is void: TeX-command-list
>
> The error is (probably) caused by the chktex.el "hack" that tries to
> append the ChkTeX menu to the AUCTeX emacs menu. Why doesn't it work?

chktex.el tries to add an entry to the variable `TeX-command-list' but
the variable is not defined when this happens.  It might work to wrap
the call to `require' into an `eval-after-load' statement, like
(eval-after-load "tex"
  '(require 'chktex))
but I haven't tested this.  And chktex.el could do other stuff which
does not work or has bad side effects in a recent version of AUCTeX.
The Readme file of ChkTeX says that it was tested with AUCTeX 2.9 which
is probably from the 1980s when people with fluorescent clothing roamed
the earth.

As an alternative to loading chktex.el you could use the lacheck wrapper
of ChkTeX or customize `TeX-command-list' yourself as proposed by the
AUCTeX manual, see (info "(auctex)Checking").

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]