I'm trying to run latex on remote host from the local host with tramp. But it seems that it cannot find the file. To be more specific:
Update
- start emacs on localhost:
- /ssh:user@remotehost:/tmp/test.tex
- compile latex on remote host using C-c C-c
- error cannot find the file test.tex " ! I can't find file `test.tex'."
so I guess it's trying to find /ssh:user@remotehost:/tmp/test.tex
but somehow cannot find it. May be it should look for /tmp/test.tex
I've tried knitr
as well and found that it tries to execute
/ssh:user@remotehost:foobar.rnw"
.
I think it should use the /ssh command since the program is running locally but I can't grasp what's happening.
Any help?
Update 2 Works fine when using emacs -Q. See comment below. will keep you posted once I have found what's wrong in the .emacs.
Update 3 The problem does not lies in the .emacs file though. I commented out everything in the .emacs and still got the same issue. I'll continue the investigation. But we are getting there.
Update 4 As suggested in the comments below firing emacs with the -Q option works find. I've got good results even with emacs -q.
Launching emacs -q is supposed to prevent loading the .emacs and the default.el files at startup. I place (setq inhibit-default-init 1)
in my .emacs file and commented the rest of the commands. Therefore only the command (setq inhibit-default-init 1)
is active in my .emacs file.
I launch emacs without any options and load tramp by hand (require 'tramp)
and tried latex again but still no success.
I must be missing something that the -q option does not load but I can't figure it out right now.
default-directory
pointing to the remote host.C-c C-c
, I am asked for the command.pdflatex
is the default, I hitRET
in order to confirm. According to the traces, it is called then remotely lke this:pdflatex \\nonstopmode\\input test.tex
. Please try to perform this starting withemacs -Q
, maybe you have some settings in your.emacs
which confuse Tramp.