1

I made the mistake of upgrading from emacs 24.3 to 24.4 today, and I seem to have broken my auctex installation yet again. I always have trouble with this on new machines, but this is the first time I've had problems on my main machine. Even downgrading hasn't helped.

Following answers like this one:

PATH and exec-path set, but emacs does not find executable

I've had stuff this in my .init.el:

(getenv "PATH")
(setenv "PATH"
(concat "/usr/local/bin" ":" (getenv "PATH")))
(setenv "PATH"
(concat "/usr/texbin" ":" (getenv "PATH")))

(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match that used by     the user's shell.

This is particularly useful under Mac OSX, where GUI apps are not started from a shell."
(interactive)
(let ((path-from-shell (replace-regexp-in-string "[ \t\n]*$" "" (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
  (setenv "PATH" path-from-shell)
 (setq exec-path (split-string path-from-shell path-separator))))
(set-exec-path-from-shell-PATH)

Later on I have:

(custom-set-variables
'(LaTeX-command "pdflatex -synctex=1"))

When I try to LaTeX from within emacs, I get the dreaded:

LaTeX: problems after [0] pages

error. pdflatex works fine from the command line (and has been working in emacs for a couple of years until I messed with it today!).

Added: getenv PATH shows:

/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/texbin:~/bin

which seems weird to me - I don't understand why /usr/texbin isn't at the beginning? Indeed I just checked and on my other machine (which I haven't touched) it is at the beginning.

Added: OK, this seems bizarre. I figured out how to get the log; it says:

Running LaTeX' onproper' with ``pdfpdflatex -synctex=1 --synctex=1 -interaction=nonstopmode "\input" proper.tex'' /bin/sh: pdfpdflatex: command not found LaTeX exited abnormally with code 127 at Tue Feb 3 17:06:15

Where could it be getting "pdfpdflatex" from?

Community
  • 1
  • 1
tsg
  • 157
  • 7
  • Is it possible your symlink to the `/usr/texbin` directory is broken? Your actual location may differ, but my symlink traces to `/usr/local/texlive/2012/bin/x86_64-darwin` – lawlist Feb 03 '15 at 17:38
  • sorry to be dumb, but - how would I know? cd /usr/texbin works OK in the terminal, for instance. – tsg Feb 03 '15 at 17:41
  • That sounds like a reasonable test to see if the symlink works, and it looks like you just ruled that out as a likely suspect. – lawlist Feb 03 '15 at 17:43
  • It's the "pdfpdflatex" bit that I really don't understand - that just seems completely wrong, and I have no idea where it's getting it from. – tsg Feb 03 '15 at 17:51
  • I did just try starting up with the configuration you posted here: http://stackoverflow.com/questions/20015930/auctex-and-emacs-on-mac , and it works OK, so clearly something very odd is going on! – tsg Feb 03 '15 at 17:57

0 Answers0