[Top][All Lists]

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

Re: tramp (2.1.6-pre); Patch: allow echo from remote shell

From: Michael Albinus
Subject: Re: tramp (2.1.6-pre); Patch: allow echo from remote shell
Date: Mon, 20 Feb 2006 17:13:02 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (hpux)

"Heike C. Zimmerer" <address@hidden> writes:

> Some systems don't allow to disable the echo from the remote shell.
> This is especially true for embedded systems with relatively simple
> tty implementations like the busybox shell on the Nokia770 internet
> tablet or on the dreambox.  Attached is a patch to tramp.el to handle
> this.  I think it's relatively self-explaining.

Looks like. But I have the problem, that it is a little bit too long
(>15 lines), which would require that you have done the paperwork with
FSF for legal issues. Maybe you did already? Otherwise, we would need
it for accepting the patch ...

See <>

> +(defcustom tramp-echo-mark "_end\x08\x08\x08\x08"

Why is this a defcustom? Is there a need that a user should change it,
for other host types but the ones you have tested?

Note that I believe that there are already too many custom options in
Tramp; one day this list should be shorten.

> +  "String mark to be transmitted after the end of shell commands
> +in order to separate their echo from the output they produce.

Coding standard: First line is one sentence, which ends with a period "."

> +(defcustom tramp-echoed-echo-mark-regexp "_end\\(\x08 \x08\\)\\{4\\}"
> +  "Regexp which matches tramp-echo-mark as it gets echoed by the remote 
> shell."

This setting I don't catch. When I enable echoing, I see something
like this in the debug buffer:

16:49:14 tramp-send-command (9) # echo ~root_end
16:49:14 tramp-get-connection-property (7) # process-name nil
16:49:14 tramp-get-connection-property (7) # process-buffer nil
16:49:14 tramp-get-connection-property (7) # process-name nil
16:49:14 tramp-wait-for-regexp (9) # 
echo ~root_end^H^H^H^H


Checking this buffer with your `tramp-echoed-echo-mark-regexp´ doesn't
match. Why do you need the space between the erase chars? Why a double erase?

Btw, shouldn't "^H" set to the erase control character via stty as
well? It might be the default, but who knows?

>  NOOUTPUT is set."
>    (unless neveropen (tramp-maybe-open-connection method user host))
>    (set-buffer (tramp-get-buffer method user host))
> +  (when tramp-cannot-disable-remote-echo
> +    (setq command (format "%s%s" command tramp-echo-mark)))

This is inside `tramp-send-command´. If we apply the check here, we
must ensure that EVERY command is sent via this function. In the past,
commands have been sent also by `tramp-send-string´ only. I believe
this has been changed in Tramp 2.1, but I'm not confident whether this
has been done evrywhere. And at least this implementation rule must be
documented at a prominent place.

In fact, your patch doesn't work for me when the remote host is
echoing. I've tested it with

  (tramp-send-command-internal method user host "stty -inlcr echo kill '^U'")

in `tramp-open-connection-setup-interactive-shell´. My local host runs
HP-UX 10.20, the remote one Solaris 8.0. If it matters. What do I miss?

Best regards, Michael.

PS: I like your paintings.

reply via email to

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