kjhealy / emacs-starter-kit

NO LONGER MAINTAINED! A drop-in starter-kit for Emacs 24, aimed at social scientists researching and writing in plain text using some combination of LaTeX, R, ESS, Git, Markdown, and Org-Mode.
http://kieranhealy.org/resources/emacs-starter-kit.html
165 stars 69 forks source link

auctex.el not found #1

Closed phren0logy closed 14 years ago

phren0logy commented 14 years ago

I'm running this on OS X. I have followed the directions on your page, but when I try to start emacs, I get the error:

File error: Cannot open load file, auctex.el

I tried to configure and build auctex, and was able to configure and make, but not make install. Based on your instructions, I'm not sure I really need to build it on OS X anyway. The error is related to the tex path, as it does not seem to use the defaults for a TeX-Live installation.

Thanks.

kjhealy commented 14 years ago

Thanks for noticing this. The instructions on the webpage are out of date — I've updated them. Can you try again and let me know if it works?

phren0logy commented 14 years ago

It worked, thanks.

As an aside, what is the consequence of using --without-texmf-dir rather than pointing it to /usr/local/texlive/texmf-local (or ~/Library/texmf)?

kjhealy commented 14 years ago

I should look again to see if this serves any purpose now — initially the motivation was to make the whole of auctex self-contained within .emacs.d/, but that went along with having a precompiled auctex in the kit. That's no longer the case.

SiGhTfOrbACQ commented 13 years ago

This also begs the question is the following snippit from the kjhealy.org / StarterKit / Local LaTeX settings / Local RefTeX Settings:

;; Make RefTex able to find my local bib files
(setq reftex-bibpath-environment-variables
'("/Users/dwg/Library/texmf/bibtex/bib"))

Still required for anything?

kjhealy commented 13 years ago

That one's in kjhealy.org—ie, the per-user customizations file—so it's strictly up to you to decide whether it's needed: if your bib files are already in a place where reftex/bibtex will find them without a problem, then this line isn't necessary. (That said I should check again to see whether it's needed even for my setup: it may be that auctex has updated enough since I originally put it in, so it's not needed.)

SiGhTfOrbACQ commented 13 years ago

I just did a clean install on a new mac, and it seems at least in my case that it finds it in the following lines of code :

;; Default bibliography
(setq reftex-default-bibliography
'("/Users/dwg/Documents/Bibliography/library.bib"))

As the directory in my first comment doesn't even exist. The above was edited to point to my actual library.bib which is my version of your socbib.bib and everything so far is working as near as I can tell. So perhaps the first entry is legacy and no longer required?

Anyhow - love your fork; I am really looking to find a good academic research publishing workflow; and your PDF really inspired me! Thanks!

henningninneh commented 13 years ago

Thank you for sharing this potentially wonderful distribution. I followed the instructions on your home page (http://kjhealy.github.com/emacs-starter-kit/), studied the documentation and spent a day fiddling with the org-files in ~/.emacs.d but I still get the error described by phren0logy above. After starting up Emacs, the following warning buffer appears:

Warning (initialization): An error occurred while loading /Users/henningninneh/.emacs.d/init.el:

File error: Cannot open load file, auctex.el

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the --debug-init option to view a complete error backtrace.

When I try to compile a .tex file, I get

/bin/sh: latex: command not found

Probably a path is set incorrectly, as suggested by the initial post. Could you please specify which instructions were out of date and what exactly needs to be changed?

Thank you so much! Henning

henningninneh commented 13 years ago

Update: it seems the error message "cannot open load file, auctex.el" and the problem encountered when trying to compile a .tex file are unrelated. I could solve the latter issue by telling AucTex where my latex distribution lives. To do this, an environment variable needs to be set by creating an environment.plist file in ~/.MacOSX/ (the usual PATH variable will not do the job because it is not inherited by Emacs when launched via Finder). See http://icio.us/NMwCW5 for details. I am still wondering why Emacs complains about not being able to load auctex.el, although it does load it. Could this cause any trouble? Any hints appreciated! Henning

henningninneh commented 13 years ago

Another, and hopefully final update: The problem of Emacs apparently not being able to load auctex.el, and, once this issue was resolved, preview-latex.el was due to wrong file names in the starter-kit-latex.org configuration file. It seems that the file names of auctex and preview-latex have changed with an update of the ELPA. I did not want to change the configuration file and instead created the following symbolic links in ~/.emacs.d/elpa/auctex-11.86: ln -s auctex-pkg.el auctex.el ln -s auctex-pkg.elc auctex.elc ln -s preview.el preview-latex.el ln -s preview.elc preview-latex.elc Don't know whether this is a sustainable workaround, though. By the way: The AucTex menu was visible in LaTex-Mode even when Emacs was complaining about not being able to load auctex.el But a lot of other things apparently were not working. (In particular the layout was completely different from the Screenshot on your homepage.)

Can't wait to start working with your distribution. It looks fantastic. Many thanks, again!

kjhealy commented 13 years ago

Hi Henning,

thanks for the report. As you say, the problem seems to be that the ELPA auctex package renamed some of its main files. I've just pushed a change to reflect this, so if you pull the latest version those soft-links shouldn't be required any more. Let me know if it works.

For the PATH, I know about this issue—you can see a similar workaround in =kjhealy.org= under "Local Pandoc Support", where I set the PATH manually. Maybe I should do this for latex as well, assuming most people will use texlive.

What about the layout was different? Given that Auctex wasn't properly activated Emacs probably used its own built-in latex mode instead (it has one, it's just not as comprehensive as Auctex) so that may have been one source of difference. Other cosmetic differences from the screenshot may have come from using a different font by default (the one shown, PragmataPro, is not the default on OS X and isn't free), and also probably from not having minimal mode activated (to get the thin dividers and smaller modeline). Try 'C-c s' or 'M-x minimal-mode' to activate this, if you haven't thrown out the contents of kjhealy.org.

henningninneh commented 13 years ago

Hi,

Thank your for your reply. I've pulled the latest changes and removed the symlinks. Everything works. Not only the font, but the whole colour theme didn't work. Minimal mode also did not work; pressing C-c s yielded an error message. Maybe some startup-scripts were not loaded, after Emacs failed to find auctex.el and preview-latex.el? Anyway, with the latest push everything seems to work. Thanks again! H

kjhealy commented 13 years ago

but the whole colour theme didn't work

What happens when you do 'M-x color-theme-solarized-dark'?

Maybe some startup-scripts were not loaded, after Emacs failed to find auctex.el and preview-latex.el?

Relaunching Emacs ought to make things reload properly. A lot of the cosmetic settings are in the kjhealy.org file—did you change its name to reflect your own username, etc?