; Script to start a telnet session in a subprocess (defun start-telnet () (interactive) (shell) (setq comint-output-filter-functions (append comint-output-filter-functions (list 'shell-strip-ctrl-m))) (setq ip-addr (nth 3 command-line-args)) (process-send-string "*shell*" (concat "telnet " ip-addr "\n")) )