Sometimes when I copy+paste into my spacemacs over SSH, I get some random garbage that seems to be due to spacemacs interpreting some of the pasted content as commands. In vim, my workaround is to run
r! cat, paste what I want into the
cat command, then
Ctrl-D to exit. When I run
M-x shell-command ENTER cat ENTER, however, I get
(shell command succeeded with no output) immediately, and no prompt.
What is the right way to get the equivalent of
r! cat from emacs (or spacemacs, in particular)?