/[tramp]/tramp/lisp/tramp.el
ViewVC logotype

Diff of /tramp/lisp/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.212 by kai, Fri Sep 13 21:19:48 2002 UTC revision 2.213 by kai, Mon Sep 16 08:46:05 2002 UTC
# Line 89  Line 89 
89  (require 'shell)  (require 'shell)
90  (require 'advice)  (require 'advice)
91    
92    (autoload 'tramp-uuencode-region "tramp-uu"
93      "Implementation of `uuencode' in Lisp.")
94    
95  ;; ;; It does not work to load EFS after loading TRAMP.    ;; ;; It does not work to load EFS after loading TRAMP.  
96  ;; (when (fboundp 'efs-file-handler-function)  ;; (when (fboundp 'efs-file-handler-function)
97  ;;   (require 'efs))  ;;   (require 'efs))
# Line 514  pair of the form (KEY VALUE).  The follo Line 517  pair of the form (KEY VALUE).  The follo
517      This specifies the list of arguments to pass to `su'.      This specifies the list of arguments to pass to `su'.
518      \"%u\" is replaced by the user name, use \"%%\" for a literal      \"%u\" is replaced by the user name, use \"%%\" for a literal
519      percent character.      percent character.
   * `tramp-encoding-command'  
     This specifies a command to use to encode the file contents for  
     transfer.  The command should read the raw file contents from  
     standard input and write the encoded file contents to standard  
     output.  In this string, the percent escape \"%f\" should be used  
     to indicate the file to convert.  Use \"%%\" if you need a literal  
     percent character in your command.  
   * `tramp-decoding-command'  
     This specifies a command to use to decode file contents encoded  
     with `tramp-encoding-command'.  The command should read from standard  
     input and write to standard output.  
   * `tramp-encoding-function'  
     This specifies a function to be called to encode the file contents  
     on the local side.  This function should accept two arguments  
     START and END, the beginning and end of the region to encode.  The  
     region should be replaced with the encoded contents.  
   * `tramp-decoding-function'  
     Same for decoding on the local side.  
520    * `tramp-telnet-program'    * `tramp-telnet-program'
521      Specifies the telnet program to use when using      Specifies the telnet program to use when using
522      `tramp-open-connection-telnet' to log in.      `tramp-open-connection-telnet' to log in.
# Line 551  file is passed through the same buffer u Line 536  file is passed through the same buffer u
536  this case, the file contents need to be protected since the  this case, the file contents need to be protected since the
537  `tramp-rsh-program' might use escape codes or the connection might not  `tramp-rsh-program' might use escape codes or the connection might not
538  be eight-bit clean.  Therefore, file contents are encoded for transit.  be eight-bit clean.  Therefore, file contents are encoded for transit.
539    See the variable `tramp-coding-commands' for details.
540    
541  Two possibilities for encoding are uuencode/uudecode and mimencode.  So, to summarize: if the method is an out-of-band method, then you
542  For uuencode/uudecode you want to set `tramp-encoding-command' to  must specify `tramp-rcp-program' and `tramp-rcp-args'.  If it is an
543  something like \"uuencode\" and `tramp-decoding-command' to \"uudecode  inline method, then these two parameters should be nil.  Every method,
544  -p\".  For mimencode you want to set `tramp-encoding-command' to  inline or out of band, must specify `tramp-connection-function' plus
545  something like \"mimencode -b\" and `tramp-decoding-command' to  the associated arguments (for example, the telnet program if you chose
 \"mimencode -b -u\".  
   
 When using inline transfer, you can use a program or a Lisp function  
 on the local side to encode or decode the file contents.  Set the  
 `tramp-encoding-function' and `tramp-decoding-function' parameters to nil  
 in order to use the commands or to the function to use.  It is  
 possible to specify one function and the other parameter as nil.  
   
 So, to summarize: if the method is an inline method, you must specify  
 `tramp-encoding-command' and `tramp-decoding-command', and  
 `tramp-rcp-program' must be nil.  If the method is out of band, then  
 you must specify `tramp-rcp-program' and `tramp-rcp-args' and  
 `tramp-encoding-command' and `tramp-decoding-command' must be nil.  
 Every method, inline or out of band, must specify  
 `tramp-connection-function' plus the associated arguments (for  
 example, the telnet program if you chose  
546  `tramp-open-connection-telnet').  `tramp-open-connection-telnet').
547    
548  Notes:  Notes:
# Line 581  When using `tramp-open-connection-su' th Line 551  When using `tramp-open-connection-su' th
551  remote host' sounds strange, but it is used nevertheless, for  remote host' sounds strange, but it is used nevertheless, for
552  consistency.  No connection is opened to a remote host, but `su' is  consistency.  No connection is opened to a remote host, but `su' is
553  started on the local host.  You are not allowed to specify a remote  started on the local host.  You are not allowed to specify a remote
554  host other than `localhost' or the name of the local host.  host other than `localhost' or the name of the local host."
   
 Using a uuencode/uudecode inline method is discouraged, please use one  
 of the base64 methods instead since base64 encoding is much more  
 reliable and the commands are more standardized between the different  
 Unix versions.  But if you can't use base64 for some reason, please  
 note that the default uudecode command does not work well for some  
 Unices, in particular AIX and Irix.  For AIX, you might want to use  
 the following command for uudecode:  
   
     sed '/^begin/d;/^[` ]$/d;/^end/d' | iconv -f uucode -t ISO8859-1  
   
 For Irix, no solution is known yet."  
555    :group 'tramp    :group 'tramp
556    :type '(repeat    :type '(repeat
557            (cons string            (cons string
# Line 5179  locale to C and sets up the remote shell Line 5137  locale to C and sets up the remote shell
5137  ;; and decoding.  Then we just use that in the last item.  The other  ;; and decoding.  Then we just use that in the last item.  The other
5138  ;; alternative is to use the Perl version of UU encoding.  But then  ;; alternative is to use the Perl version of UU encoding.  But then
5139  ;; we need a Lisp version of uuencode.  ;; we need a Lisp version of uuencode.
5140    ;;
5141    ;; Old text from documentation of tramp-methods:
5142    ;; Using a uuencode/uudecode inline method is discouraged, please use one
5143    ;; of the base64 methods instead since base64 encoding is much more
5144    ;; reliable and the commands are more standardized between the different
5145    ;; Unix versions.  But if you can't use base64 for some reason, please
5146    ;; note that the default uudecode command does not work well for some
5147    ;; Unices, in particular AIX and Irix.  For AIX, you might want to use
5148    ;; the following command for uudecode:
5149    ;;
5150    ;;     sed '/^begin/d;/^[` ]$/d;/^end/d' | iconv -f uucode -t ISO8859-1
5151    ;;
5152    ;; For Irix, no solution is known yet.
5153    
5154  (defvar tramp-coding-commands  (defvar tramp-coding-commands
5155    '(("mimencode -b" "mimencode -u -b"    '(("mimencode -b" "mimencode -u -b"
5156       base64-encode-region base64-decode-region)       base64-encode-region base64-decode-region)

Legend:
Removed from v.2.212  
changed lines
  Added in v.2.213

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26