From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: pdflatex not found? Date: Tue, 27 Oct 2015 06:45:48 +0100 Message-ID: References: <6sw6c7si4xe0jy.fsf@pfdstudio.com> <87io5t6ubr.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqx4z-0000Qz-9Q for emacs-orgmode@gnu.org; Tue, 27 Oct 2015 01:45:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zqx4x-0004Fe-Vt for emacs-orgmode@gnu.org; Tue, 27 Oct 2015 01:45:53 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:34054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqx4x-0004Ez-MZ for emacs-orgmode@gnu.org; Tue, 27 Oct 2015 01:45:51 -0400 Received: by wikq8 with SMTP id q8so194847527wik.1 for ; Mon, 26 Oct 2015 22:45:51 -0700 (PDT) In-Reply-To: <87io5t6ubr.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode@gnu.org Envoy=C3=A9 de mon iPhone > Le 27 oct. 2015 =C3=A0 01:14, Nick Dokos a =C3=A9crit := >=20 > Peter Davis writes: >=20 >> Nick Dokos writes: >>=20 >>=20 >>> Peter Davis writes: >>>=20 >>>> I'm trying to export PDF from org, but I'm getting the error: >>>>=20 >>>> pdflatex: Command not found. [3 times] >>>>=20 >>>> I've checked the definition of exec-path, and it includes >>>> "/usr/texbin", which is where tcsh tells me the executable is. >>>>=20 >>>> Any ideas? >>>=20 >>> Backtrace? >>=20 >> Sorry. Here's the backtrace: >>=20 >> Debugger entered--Lisp error: (error "PDF file ./test.pdf wasn't produced= ") >> signal(error ("PDF file ./test.pdf wasn't produced")) >> error("PDF file ./test.pdf wasn't produced") >> org-latex-compile("./test.tex") >> #[(file) "\301=08!\207" [file org-latex-compile] 2]("./test.tex") >> org-export-to-file(latex "./test.tex" nil nil nil nil nil #[(file) >> "\301=08!\207" [file org-latex-compile] 2]) >> org-latex-export-to-pdf(nil nil nil nil) >> (org-open-file (org-latex-export-to-pdf nil s v b)) >> (if a (org-latex-export-to-pdf t s v b) (org-open-file (org-latex-export= -to-pdf nil s v b))) >> (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b) >> (org-open-file (org-latex-export-to-pdf nil s v b))))(nil nil nil nil) >> org-export-dispatch(nil) >> call-interactively(org-export-dispatch nil nil) >> command-execute(org-export-dispatch) >>=20 >> This seems less useful to me than the *Messages* buffer: >=20 > Yes, probably, but if I can get people to submit backtraces when getting > an error, we can cut down the email volume by a factor of 2.43 (making up > fictitious data to bolster my case...) In all seriousness, at least it > shows that you are not going down some strange path. >=20 > It's not clear to me why the error message in the message file is differen= t > from the error message above though. >=20 >> Debug on Error enabled globally >> org-babel-exp processing... >> executing Dot code block... >> Wrote /var/folders/d4/xb7t0gbd0f97p6494kz5xzdnmlncz8/T/babel-2213VOW/ob-i= nput-22136yU >> Code block evaluation complete. >> Saving file /Users/davisp/Dropbox/HMH/test.tex... >> Wrote /Users/davisp/Dropbox/HMH/test.tex >> Processing LaTeX file ./test.tex... >> pdflatex: Command not found. [3 times] >> Entering debugger... >> Mark set >> End of buffer >>=20 >> I did verify that the shell, my default of tcsh, does show pdflatex at >> the right location, /usr/texbin/pdflatex >=20 > In combination, this pretty much says that org-latex-pdf-process was > called (by examining the code for org-latex-compile) and it is set to > the default value of invoking pdflatex three times (hence - probably - > the "command not found 3 times" error), so as I said the standard path. >=20 > As others have pointed out, your emacs does not know where to find > pdflatex, even though your tcsh might. If your emacs is started from a > tcsh that can find pdflatex, that would be strange; if it is started > from your desktop environment/window manager, not so much (there are > many things that could go wrong). >=20 > OTOH, if exec-path contains the directory where pdflatex resides, then > things are a bit screwy: exec-path is used by call-process, which is > used by shell-command, which is used by org-latex-compile: so pdflatex > should be found - that's a bit of a mystery. >=20 > What happens if you say M-x shell-command RET pdflatex RET? >=20 > Somebody suggested running "which pdflatex" in your shell - what does > that say? >=20 > And you say it should be in /usr/texbin - what happens if you invoke > it with an absolute path: "/usr/texbin/pdflatex" in your shell? Imiight have missed it - but which OS are you using? Rainer >=20 > -- > Nick >=20 >=20 >=20