0

I've written a command that ssh-es to a remote host and runs an interactive command there. Something like:

(defun remote-command ()
  (interactive)
  (pop-to-buffer (get-buffer-create "*remote-command*"))
  (async-shell-command "ssh remote-host interactive-command" (current-buffer)))

A longstanding annoyance has been that when I enter a very long line, some portion of the end of the line is echoed back before the command line is executed by interactive-command. The main notable consequence, aside from screen clutter, is that if the end of the line contains an odd number of quotation marks, electric-pair-mode gets confused and no longer inserts matching pairs when I type a quote.

When I try running this ssh command from an OS X Terminal, I see similar behavior, except that the echoed portion is everything but the first physical line that the terminal presents. I discovered by accident that if I give ssh the -t option in Terminal, the echoing stops completely. I tried adding that option to my Emacs command, but it makes no difference.

That's that I've tried that have made no difference:

  • stty -echo before running interactive-command
  • Setting the TERM environment variable to various settings before running interactive-command, eg: vt100, dumb
  • Setting comint-process-echoes to t

If it makes a difference, interactive-command is actually spark-shell.

Help?

1 Answer 1

0

So like I mentioned, the command I was running was actually spark-shell. I finally discovered that this command can be run with the option -Xnojline, and boom, none of my lines are echoed any longer, partially or fully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.