3

I have a pdflatex program located in

/usr/local/texlive/2014/bin/i386-linux/pdflatex

I added it's folder to $PATH both in .bashrc and .bash_profile:

PATH=$PATH:/usr/local/texlive/2014/bin/i386-linux/

When I run this command in ordinary shell: both in X and console, it works. I wanted to run pdflatex upon the current file in buffer using this elisp command:

(start-process-shell-command
    "pdflatex"
    "*async pdflatex*"
    (concat "pdflatex " file-name))

It works in Windows, worked in Linux previously. But now I get an error:

/usr/bin/bash: pdflatex: command not found

How to fix?

Dan
  • 32,980
  • 7
  • 102
  • 169
user4035
  • 1,059
  • 13
  • 24

1 Answers1

4

Let me start by guessing that you start emacs from your graphical environment, and not from a shell. If you start it from the shell, emacs will inherit PATH from the shell, and you should be able to run your program.

How to fix depends on what linux distro you are using. As for me, I am running Ubuntu (15.10), and emacs sees the environment defined in .profile. In other words, try adding /usr/local/texlive/2014/bin/i386-linux to your PATH in .profile.