From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: compile latex on remote server Date: Mon, 7 Sep 2015 09:11:00 -0700 Message-ID: References: <874mj61iec.fsf@hornfels.zedat.fu-berlin.de> <87zj0yz6v4.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYz0c-0008U3-Rs for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 12:11:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYz0Z-0002jO-MR for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 12:11:06 -0400 Received: from iport-bcv2-out.ucsd.edu ([132.239.0.73]:3501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYz0Z-0002iv-Dk for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 12:11:03 -0400 In-Reply-To: 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: Zhihao Ding Cc: Loris Bennett , emacs-orgmode@gnu.org On Mon, 7 Sep 2015, Zhihao Ding wrote: > My emacs session is local and I am using tramp to open the org file on the > remote server. Then when I tried to export it to latex and compile I get > that error messages. > > Cheers, > Zhihao > > > On 7 September 2015 at 14:39, Loris Bennett > wrote: > >> Hi Zhihao, >> >> Zhihao Ding writes: >> >>> Thanks for your reply. In export if I do "l P" or "l O" I get the follow >>> messages >>> >>> Transcript written on .//texput.log. >>> This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) >>> restricted \write18 enabled. >>> entering extended mode >>> ! I can't find file `/ssh:zhihao@server:/data/home/zhihao/sgt.tex'. >> >> Is this file created on the remote server? If so, can you open it in >> Emacs via tramp? >> >> Cheers, >> >> Loris I confirm this behavior. Looks like the shell command to produce the pdf runs on the remote, but uses the tramp filename. Maybe something like diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index ddbbd33..dce83af 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -3456,7 +3456,8 @@ Return PDF file name or an error if it couldn't be produced." (replace-regexp-in-string "%b" (shell-quote-argument base-name) (replace-regexp-in-string - "%f" (shell-quote-argument full-name) + "%f" (shell-quote-argument + (org-babel-local-file-name full-name)) (replace-regexp-in-string "%o" (shell-quote-argument out-dir) command t t) t t) t t) outbuf)) will fix it. It runs on my setup - producing a pdf on the remote server, but I have not run `make test'. HTH, Chuck