I'm very new to Emacs. I've installed AUCTeX version 11.89.4 using package manager (
auctex, install it). It works, at least it shows compiled pdf result from test .tex file in local buffer after several
C-c C-c strokes. Now I want to do some customization -- for example, showing result in external evince program. However, the more tutorials and docs I read, the more it seems to me that my AUCTeX installation is somehow broken:
- I know that
C-h v AUCTeX-versionshould give me AUCTeX version. However, I don't have such variable -- describe variable gives no match. I have learned that the version is 11.89.4 from the package manager.
- I don't have variable
TeX-view-program-list, which, as I've read, is used for setting view program. In fact, I have only three variables starting with
Tex, and all of them I've declared in
- I don't have menu item
LaTeXwhich is mentioned here. I have only menu item
TeX, and there is no "Customize AUCTeX" submenu:
- There is no key
C-c ~which is supposed to turn on math mode. There is no variable
LaTeX-math-abbrev-prefixand no function
LaTeX-math-mode, although I've added line
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)to my
init.eland it had been read without any problems.
- some other things, but I think this should be enough to show the problem.
My OS is Ubuntu 14.04, GNU Emacs 24.5.1. This is version is still absent from Ubuntu repos, so I have built it from sources and installed via checkinstall.
Ubuntu package auctex is not installed -- I just followed manual instructions and it doesn't says anything about system-wide packages. I have no variable
TeX-lisp-directory; If I start Emacs without executing init.el (-q), and then run
M-x package-initialize, I get the following error:
(file-error "Cannot open load file" "no such file or directory" "tex-site"). I don't know what it means right now, but it seems that google has something on this -- I will look into.
There is another point which, as I think, should be made clear. As I have read in EmacsWiki since Emacs 24 package initialization happens after loading init.el. However, I needed
package-installed-p function, so I forced loading packages in the beginning of init.el by inserting the following code (taken from wiki):
(setq package-enable-at-startup nil) (package-initialize)
I didn't noticed earlier, but in fact I get error
"no such file or directory" "tex-site" after running
package-initialize when calling in from
init.el too. It seems to me that the root of my problem is that I forgot to add the line
(require 'auctex). After adding it, auctex finally works, I have
TeX-lisp-directory and other vars, however, now I see the following warning in Messages:
Warning (initialization): An error occurred while loading `/home/ars/.emacs.d/init.el': error: Required feature `auctex' was not provided
What's wrong with this way of loading packages? Should I require them explicitly or not?