tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp mosh method


From: Michael Albinus
Subject: Re: Tramp mosh method
Date: Mon, 19 Nov 2012 17:09:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

> MA> Would you like to work on this?
>
> Yes, but last time I tried to grok tramp's internals, it took me a long
> time.

That's the educational part of my proposal :-) It would be great, if
somebody but me would be familiar with Tramp's internals.

> Can you give me a function stub, which I will fill in, to do generic
> filtering of process data before Tramp's handlers see it?  If it's a
> simple pipe function, I can write the code to filter ANSI sequences
> out.  I think it should simply be
>
> (defun tramp-io-filter data &optional term &rest options)
>
> Where DATA is the string, and TERM defaults to something minimal like
> vt100.

At a first glance, a process filter would do the job. But this might be
a problem, because we use process filters already for running remote
shells, see `tramp-handle-shell-command'. And for a given process, there
can be only one filter function.

Maybe we write an own `tramp-process-filter', which calls also
`comint-output-filter' when indicated (by another hook). Or we use the
`add-function' functionality mentioned recently by Stefan on
emacs-devel, see 
<http://thread.gmane.org/gmane.emacs.devel/153997/focus=154852>.
This would restrict the mosh method to Emacs versions
greater than 24.3, but so what.

> I'd rather not rely on external code for this because we need to be very
> flexible, handling unexpected sequences and terminal bugs in the
> future.  I hope you agree.

If we use the latter approach (`add-function'), we would be able to fix
such errors in Emacs' trunk. Somehow, I hate code duplication ...

> Ted

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]