When I tried to run Emacs on a remote server through ssh, the C-y
(even M-x yank
) can't work.
Every time I press C-y
, it says "Mark set", but nothing else happens. I'm working under Linux and the remote server is a Mac pro.
Now I can only download the file to my pc. Any ideas on how to better solve this problem?
I suspect your problem is not due to Emacs running remotely, but instead it is due to Emacs running in "text mode" (i.e. running inside a terminal emulator). When running in such a mode, Emacs does not know about any surrounding GUI that might be running, so C-y
only yanks text you have previously killed in the same Emacs session via something like C-w
or M-w
.
You can try to do a "paste" in your terminal emulator (probably Cmd-v), which will send the selected text to the underlying application (in this case, Emacs) as if it had been typed. As long as the text you're pasting is made of "simple enough" characters it might work fine. If it contains any funny control chars, all bets are off (if it contains non-ASCII chars it may also behave in a funny way, depending on whether the whole "terminal-emulator+ssh+Emacs" are configured just right or not).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With