[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting ansi-term(?) to do something via elisp
From: |
Tim X |
Subject: |
Re: Getting ansi-term(?) to do something via elisp |
Date: |
Wed, 12 Jan 2011 07:58:08 +1100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Gary <help-gnu-emacs@garydjones.name> writes:
> 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.
Do an apropos for 'ansi-color'. You will find a number of functions and
variables used to process ansi colour escape sequences from comint
buffers. Should be able to setup soemthing using the process output
filter that will handle these escape sequences.
Tim
--
tcross (at) rapttech dot com dot au
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Getting ansi-term(?) to do something via elisp,
Tim X <=