emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Zhihao Ding <zhihao.ding@gmail.com>
Cc: Loris Bennett <loris.bennett@fu-berlin.de>, emacs-orgmode@gnu.org
Subject: Re: compile latex on remote server
Date: Mon, 7 Sep 2015 09:11:00 -0700	[thread overview]
Message-ID: <alpine.OSX.2.20.1509070903220.595@charles-berrys-macbook.local> (raw)
In-Reply-To: <CANEsYxbq1q9=wauGVq9j+vmvD1a7DO8p0QmtV1i2X9fsjMcfxw@mail.gmail.com>

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 <loris.bennett@fu-berlin.de>
> wrote:
>
>> Hi Zhihao,
>>
>> Zhihao Ding <zhihao.ding@gmail.com> 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

      reply	other threads:[~2015-09-07 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 13:08 compile latex on remote server Zhihao Ding
2015-09-07 13:14 ` Loris Bennett
2015-09-07 13:25   ` Zhihao Ding
2015-09-07 13:39     ` Loris Bennett
2015-09-07 13:43       ` Zhihao Ding
2015-09-07 16:11         ` Charles C. Berry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.20.1509070903220.595@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=loris.bennett@fu-berlin.de \
    --cc=zhihao.ding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).