Hi Michael.

On Tue, 13 Dec 2011 14:54:00 +0100, Michael Albinus <[email protected]> 
wrote:
> Dmitry Kurochkin <[email protected]> writes:
> 
> > Hello.
> 
> Hi,
> 
> > I think a simple solution would be to test that /dev/stdout exists and
> > is a character device (i.e. "test -c /dev/stdout") before trying to do
> > "uudecode -o /dev/stdout".
> 
> Good idea!
> 
> > I can provide additional info or do testing if needed.
> 
> Please try the following patch (line numbers might differ):
> 

The patch works, thanks.  Now the "uudecode -o /dev/stdout" encoder is
skipped.

It seems that `tramp-find-inline-encoding' should check that decoder
output matches the original input, in addition to the zero exit code.

Regards,
  Dmitry

> --8<---------------cut here---------------start------------->8---
> *** /home/albinus/src/tramp-2-1-stable/lisp/tramp.el.~1~      2011-12-13 
> 14:51:46.000000000 +0100
> --- /home/albinus/src/tramp-2-1-stable/lisp/tramp.el  2011-12-13 
> 14:51:46.000000000 +0100
> ***************
> *** 7210,7216 ****
>       (b64 "recode data..base64" "recode base64..data")
>       (b64 tramp-perl-encode-with-module tramp-perl-decode-with-module)
>       (b64 tramp-perl-encode tramp-perl-decode)
> !     (uu  "uuencode xxx" "uudecode -o /dev/stdout")
>       (uu  "uuencode xxx" "uudecode -o -")
>       (uu  "uuencode xxx" "uudecode -p")
>       (uu  "uuencode xxx" tramp-uudecode)
> --- 7210,7216 ----
>       (b64 "recode data..base64" "recode base64..data")
>       (b64 tramp-perl-encode-with-module tramp-perl-decode-with-module)
>       (b64 tramp-perl-encode tramp-perl-decode)
> !     (uu  "uuencode xxx" "test -c /dev/stdout && uudecode -o /dev/stdout")
>       (uu  "uuencode xxx" "uudecode -o -")
>       (uu  "uuencode xxx" "uudecode -p")
>       (uu  "uuencode xxx" tramp-uudecode)
> ***************
> *** 7308,7314 ****
>                  "Checking remote decoding command `%s' for sanity" rem-dec)
>                 (unless (zerop (tramp-send-command-and-check
>                                 vec
> !                               (format "echo %s | %s | %s"
>                                         magic rem-enc rem-dec)
>                                 t))
>                   (throw 'wont-work-remote nil))
> --- 7308,7314 ----
>                  "Checking remote decoding command `%s' for sanity" rem-dec)
>                 (unless (zerop (tramp-send-command-and-check
>                                 vec
> !                               (format "echo %s | (%s) | (%s)"
>                                         magic rem-enc rem-dec)
>                                 t))
>                   (throw 'wont-work-remote nil))
> --8<---------------cut here---------------end--------------->8---
> 
> > Regards,
> >   Dmitry
> 
> Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to