unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Gary <help-gnu-emacs@garydjones.name>
To: help-gnu-emacs@gnu.org
Subject: Getting ansi-term(?) to do something via elisp
Date: Mon, 10 Jan 2011 11:03:36 +0100	[thread overview]
Message-ID: <igelho$ng1$1@dough.gmane.org> (raw)

I am trying to "script" part of connecting to a remote server as part of
a mode I am working on. What I've discovered is that the remote server
seems to be sending colour control sequences as part of the output, so a
normal shell looks "strange". Is there any alternative to using
something like

,----
| (let ((mypass (read-passwd "Login password for user@server: "
|               )
|      ))
|   (start-process-shell-command foo
|                                "foo"
|                                "ssh bar@foo")
|   (process-send-string foo (concat mypass "\n"))
| ...
`----

perhaps using ansi-term, which can handle the control sequences?

I thought of just trying to send the commands that I need ("ssh" and so
on) to an ansi-term buffer, but don't know how to get hold of the
process.

-- 
Gary        Please do NOT send me 'courtesy' replies off-list.




             reply	other threads:[~2011-01-10 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 10:03 Gary [this message]
     [not found] <mailman.3.1294653860.11614.help-gnu-emacs@gnu.org>
2011-01-11 20:58 ` Getting ansi-term(?) to do something via elisp Tim X
2011-01-12  7:51   ` Gary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='igelho$ng1$1@dough.gmane.org' \
    --to=help-gnu-emacs@garydjones.name \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).