# [2020.04.23] Emacs TCP Server

Today I tried to work from my corporate MacBook at a cloud server on
Ubuntu. When one uses PyCharm, the flow is quite straightforward with
their genuinely charming deployment feature. Again I installed
`shh-deploy` package for Emacs and promptly removed it after finding
too slow for my internet connection.

Then I moved to Emacs server, learnt about its TCP version but had no
luck with TCP port forwarding through `ssh`. Emacs client didn't work
over `ssh` in such a setting. But I discovered an ability of `ssh` to
forward not only TCP ports but also UNIX sockets. So, if not on MS
Windows, one probably doesn't want to use Emacs TCP server at all.
But to use this technology successfully, the only thing that I found
requires forwarding Emacs server socket _from_ a remote server to a
local machine. Unfortunately, I can do that only from my laptop _to_
the cloud server.

The general advice for using Emacs on some remote code is to rely on
TRAMP. TRAMP is magic, but alas, it's hardly compatible with `elpy`
which I use for Python development. Unfortunately, I need to run,
e.g. unit tests, in an exact `virtualenv` and TRAMP can't do that.
The maintainer of `elpy` suggested using `sshfs` instead of it, which
could be a good idea if your local operating system is interoperation
with the remote one. In my case, these are macOS and Ubuntu. No luck
again. And yes, `sshfs` is fun but probably with better internet than
mine:)

Running Emacs at a remote server is a feasible solution, but then
another problem arises. Namely, I don't want to save my corporate
credentials there but want to push and pull changes from corporate
repositories. I'm still looking for a solution.