From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: pdflatex not found? Date: Mon, 26 Oct 2015 20:14:48 -0400 Message-ID: <87io5t6ubr.fsf@alphaville.usersys.redhat.com> References: <6sw6c7si4xe0jy.fsf@pfdstudio.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqruo-0006qy-7a for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 20:15:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zqruk-0007ao-0Z for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 20:15:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:42035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqruj-0007ak-QB for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 20:14:57 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zqrui-0004MM-HJ for emacs-orgmode@gnu.org; Tue, 27 Oct 2015 01:14:56 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Oct 2015 01:14:56 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Oct 2015 01:14:56 +0100 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: emacs-orgmode@gnu.org Peter Davis writes: > Nick Dokos writes: > > >> Peter Davis writes: >> >>> I'm trying to export PDF from org, but I'm getting the error: >>> >>> pdflatex: Command not found. [3 times] >>> >>> I've checked the definition of exec-path, and it includes >>> "/usr/texbin", which is where tcsh tells me the executable is. >>> >>> Any ideas? >>> >> >> Backtrace? > > Sorry. Here's the backtrace: > > 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!\207" [file org-latex-compile] 2]("./test.tex") > org-export-to-file(latex "./test.tex" nil nil nil nil nil #[(file) > "\301!\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) > > This seems less useful to me than the *Messages* buffer: > 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. It's not clear to me why the error message in the message file is different from the error message above though. > Debug on Error enabled globally > org-babel-exp processing... > executing Dot code block... > Wrote /var/folders/d4/xb7t0gbd0f97p6494kz5xzdnmlncz8/T/babel-2213VOW/ob-input-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 > > I did verify that the shell, my default of tcsh, does show pdflatex at > the right location, /usr/texbin/pdflatex > 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. 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). 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. What happens if you say M-x shell-command RET pdflatex RET? Somebody suggested running "which pdflatex" in your shell - what does that say? 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? -- Nick