0

I run my hello.tex file. But it always has the warning:

Error running timer ‘latex-preview-pane-update’: (file-error "Searching for program" "No such file or directory" "pdflatex")

I've checked .emacs file. I've been adding script in .emacs.

(setenv "PATH" "/Library/TeX/texbin:$PATH" t)
(latex-preview-pane-enable)

But it still dosen't work. How can I do now?

DylanYang
  • 11
  • 3

1 Answers1

0

You need to update the exec-path. Your solution should work with call-process-shell-command, but that uses call-process. So, you want something like

(cl-pushnew "/Library/TeX/texbin" exec-path :test #'equal)

Then, you can check the program is found with (executable-find "pdflatex").

Rorschach
  • 31,301
  • 5
  • 78
  • 129
  • Thank you! After your solution it works now:) But another question, why PDF couldn't display well. I got the information on the right window %PDF-1.5 %–‘≈ÿ 3 0 obj << /Length 485 /Filter /FlateDecode >> stream – DylanYang Apr 21 '19 at 06:48
  • @DylanYang I don't use that package, you should probably ask a new question as that sounds like an unrelated problem. – Rorschach Apr 21 '19 at 17:01
  • Thank you. I really appreciate for your help. After your instructions it woks now:) – DylanYang Apr 22 '19 at 01:18