* problem with tramp and uuencode-decode
@ 2004-11-04 15:31 Han Boetes
2004-11-04 20:47 ` Han Boetes
0 siblings, 1 reply; 6+ messages in thread
From: Han Boetes @ 2004-11-04 15:31 UTC (permalink / raw)
Hi,
I solved the mysterious file `-' problem:
This is what happens with the uudecode provided with sharutils package:
~% echo xyzzy | uuencode xxx | uudecode -o -
xyzzy
But this is what happens with the uudecode provided by *BSD
~% echo xyzzy | uuencode xxx | uudecode -o -
~% rm -- -
~% echo xyzzy | uuencode xxx | uudecode -o /dev/stdout
xyzzy
/dev/stdout also works fine with the sharutils implementation.
# Han
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with tramp and uuencode-decode
2004-11-04 15:31 problem with tramp and uuencode-decode Han Boetes
@ 2004-11-04 20:47 ` Han Boetes
2004-11-05 0:37 ` Han Boetes
0 siblings, 1 reply; 6+ messages in thread
From: Han Boetes @ 2004-11-04 20:47 UTC (permalink / raw)
Han Boetes wrote:
> uudecode -o /dev/stdout
A bit of research (not by me) proves that this is recommended
behaviour according to POSIX.
http://www.opengroup.org/onlinepubs/000095399/utilities/uudecode.html
# Han
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with tramp and uuencode-decode
2004-11-04 20:47 ` Han Boetes
@ 2004-11-05 0:37 ` Han Boetes
2004-11-05 12:43 ` Kim F. Storm
2004-11-05 14:52 ` Kai Grossjohann
0 siblings, 2 replies; 6+ messages in thread
From: Han Boetes @ 2004-11-05 0:37 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
I really start feeling like an emacs-hacker :-)
I also cleaned up some trailing whitespace in the meanwhile.
Please apply this patch:
# Han
[-- Attachment #2: tramp.el.diff --]
[-- Type: text/plain, Size: 14857 bytes --]
* looking for lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263 to compare with
* comparing to lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
M lisp/net/tramp.el
M src/Makefile.in
* modified files
--- orig/lisp/net/tramp.el
+++ mod/lisp/net/tramp.el
@@ -34,7 +34,7 @@
;;
;; Notes:
;; -----
-;;
+;;
;; This package only works for Emacs 20 and higher, and for XEmacs 21
;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs
;; 19 is reported to have other problems. For XEmacs 21, you need the
@@ -204,7 +204,7 @@
gives the same backup policy for Tramp files on their hosts like the
policy for local files."
- :type '(repeat
+ :type '(repeat
(list (regexp :tag "File regexp")
(string :tag "Backup Dir")
(set :inline t
@@ -505,7 +505,7 @@
(tramp-copy-args nil)
(tramp-copy-keep-date-arg "-p")
(tramp-password-end-of-line "xy")) ;see docstring for "xy"
- ("fcp"
+ ("fcp"
(tramp-connection-function tramp-open-connection-rsh)
(tramp-login-program "fsh")
(tramp-copy-program "fcp")
@@ -632,7 +632,7 @@
("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n")
("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n")
("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n")
- ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")
+ ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")
("su" tramp-multi-connect-su "su - %u%n")
("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n"))
"*List of connection functions for multi-hop methods.
@@ -776,7 +776,7 @@
"sudo" tramp-completion-function-alist-su)
(tramp-set-completion-function
"multi" nil)
- (tramp-set-completion-function
+ (tramp-set-completion-function
"scpx" tramp-completion-function-alist-ssh)
(tramp-set-completion-function
"sshx" tramp-completion-function-alist-ssh)
@@ -1535,8 +1535,8 @@
rm -f /tmp/tramp.$$
}"
"Shell function to implement `uudecode' to standard output.
-Many systems support `uudecode -o -' for this or `uudecode -p', but
-some systems don't, and for them we have this shell function.")
+Many systems support `uudecode -o /dev/stdout', but some systems
+don't, and for them we have this shell function.")
;; Perl script to implement `file-attributes' in a Lisp `read'able
;; output. If you are hacking on this, note that you get *no* output
@@ -1982,7 +1982,7 @@
(setq filename (tramp-file-name-localname
(tramp-dissect-file-name
(expand-file-name filename)))))
-
+
;; Right, they are on the same host, regardless of user, method, etc.
;; We now make the link on the remote machine. This will occur as the user
;; that FILENAME belongs to.
@@ -1991,7 +1991,7 @@
l-multi-method l-method l-user l-host
(format "cd %s && %s -sf %s %s"
cwd ln
- filename
+ filename
l-localname)
t)))))
@@ -2350,7 +2350,7 @@
(let* ((attr (file-attributes f))
(modtime (nth 5 attr))
(mt (visited-file-modtime)))
-
+
(cond
;; file exists, and has a known modtime.
((and attr (not (equal modtime '(0 0))))
@@ -2665,7 +2665,7 @@
(push (buffer-substring (point)
(tramp-line-end-position))
result))
-
+
(tramp-send-command multi-method method user host "cd")
(tramp-wait-for-output)
@@ -3082,7 +3082,7 @@
'file-error
(list "Removing old file name" "no such directory" filename)))
;; Which is better, -r or -R? (-r works for me <daniel@danann.net>)
- (tramp-send-command multi-method method user host
+ (tramp-send-command multi-method method user host
(format "rm -r %s" (tramp-shell-quote-argument localname)))
;; Wait for the remote system to return to us...
;; This might take a while, allow it plenty of time.
@@ -3090,7 +3090,7 @@
;; Make sure that it worked...
(and (file-exists-p filename)
(error "Failed to recusively delete %s" filename))))
-
+
(defun tramp-handle-dired-call-process (program discard &rest arguments)
"Like `dired-call-process' for tramp files."
(with-parsed-tramp-file-name default-directory nil
@@ -3112,7 +3112,7 @@
(tramp-send-command-and-check multi-method method user host nil)
(tramp-send-command multi-method method user host "cd")
(tramp-wait-for-output)))))
-
+
(defun tramp-handle-dired-compress-file (file &rest ok-flag)
"Like `dired-compress-file' for tramp files."
;; OK-FLAG is valid for XEmacs only, but not implemented.
@@ -3476,7 +3476,7 @@
(when (and (numberp buffer) (zerop buffer))
(error "Implementation does not handle immediate return"))
(when (consp buffer) (error "Implementation does not handle error files"))
- (shell-command
+ (shell-command
(mapconcat 'tramp-shell-quote-argument
(cons program args)
" ")
@@ -4158,7 +4158,7 @@
;; `tramp-completion-file-name-regexp-unified' aren't different.
;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
-;; Using `last-input-event' is a little bit risky, because completing a file
+;; Using `last-input-event' is a little bit risky, because completing a file
;; might require loading other files, like "~/.netrc", and for them it
;; shouldn't be decided based on that variable. On the other hand, those files
;; shouldn't have partial tramp file name syntax. Maybe another variable should
@@ -4262,7 +4262,7 @@
(funcall (nth 0 x) (nth 1 x)))))
(tramp-get-completion-function m))
- (setq result (append result
+ (setq result (append result
(mapcar
(lambda (x)
(tramp-get-completion-user-host
@@ -4303,7 +4303,7 @@
;; [nil nil "x" nil nil]
;; [nil "x" nil nil nil]
-;; "/x:" "/x:y" "/x:y:"
+;; "/x:" "/x:y" "/x:y:"
;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""]
;; "/[x/" "/[x/y"
;; [nil "x" nil "" nil] [nil "x" nil "y" nil]
@@ -4749,7 +4749,7 @@
"touch" nil (current-buffer) nil "-t" touch-time file))
(pop-to-buffer (current-buffer))
(error "tramp-touch: touch failed"))))))
-
+
(defun tramp-buffer-name (multi-method method user host)
"A name for the connection buffer for USER at HOST using METHOD."
(if multi-method
@@ -4907,7 +4907,7 @@
(file-exists-p existing)
(not (file-exists-p nonexisting))))
(error "Couldn't find command to check if file exists."))))
-
+
;; CCC test ksh or bash found for tilde expansion?
(defun tramp-find-shell (multi-method method user host)
@@ -5006,9 +5006,9 @@
(tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path)
(tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path)))
-;; ------------------------------------------------------------
-;; -- Functions for establishing connection --
-;; ------------------------------------------------------------
+;; ------------------------------------------------------------
+;; -- Functions for establishing connection --
+;; ------------------------------------------------------------
;; The following functions are actions to be taken when seeing certain
;; prompts from the remote host. See the variable
@@ -5249,7 +5249,7 @@
(when multi-method
(error "Cannot multi-connect using telnet connection method"))
(tramp-pre-connection multi-method method user host)
- (tramp-message 7 "Opening connection for %s@%s using %s..."
+ (tramp-message 7 "Opening connection for %s@%s using %s..."
(or user (user-login-name)) host method)
(let ((process-environment (copy-sequence process-environment)))
(setenv "TERM" tramp-terminal-type)
@@ -5283,7 +5283,7 @@
p multi-method method user host)
(tramp-post-connection multi-method method user host)))))
-
+
(defun tramp-open-connection-rsh (multi-method method user host)
"Open a connection using an rsh METHOD.
This starts the command `rsh HOST -l USER'[*], then waits for a remote
@@ -5308,7 +5308,7 @@
(error "Cannot multi-connect using rsh connection method"))
(tramp-pre-connection multi-method method user host)
(if (and user (not (string= user "")))
- (tramp-message 7 "Opening connection for %s@%s using %s..."
+ (tramp-message 7 "Opening connection for %s@%s using %s..."
user host method)
(tramp-message 7 "Opening connection at %s using %s..." host method))
(let ((process-environment (copy-sequence process-environment))
@@ -5337,9 +5337,9 @@
(> emacs-major-version 20))
tramp-dos-coding-system))
(p (if (and user (not (string= user "")))
- (apply #'start-process bufnam buf login-program
+ (apply #'start-process bufnam buf login-program
real-host "-l" user login-args)
- (apply #'start-process bufnam buf login-program
+ (apply #'start-process bufnam buf login-program
real-host login-args)))
(found nil))
(tramp-set-process-query-on-exit-flag p nil)
@@ -5409,10 +5409,10 @@
tramp-actions-before-shell)
(tramp-open-connection-setup-interactive-shell
p multi-method method user host)
- (tramp-post-connection multi-method method
+ (tramp-post-connection multi-method method
user host)))))
-;; HHH: Not Changed. Multi method. It is not clear to me how this can
+;; HHH: Not Changed. Multi method. It is not clear to me how this can
;; handle not giving a user name in the "file name".
;;
;; This is more difficult than for the single-hop method. In the
@@ -5482,7 +5482,7 @@
(tramp-post-connection multi-method method user host)))))
;; HHH: Changed. Multi method. Don't know how to handle this in the case
-;; of no user name provided. Hack to make it work as it did before:
+;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-telnet (p method user host command)
@@ -5504,8 +5504,8 @@
(tramp-process-multi-actions p method user host
tramp-multi-actions)))
-;; HHH: Changed. Multi method. Don't know how to handle this in the case
-;; of no user name provided. Hack to make it work as it did before:
+;; HHH: Changed. Multi method. Don't know how to handle this in the case
+;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-rlogin (p method user host command)
@@ -5530,8 +5530,8 @@
(tramp-process-multi-actions p method user host
tramp-multi-actions)))
-;; HHH: Changed. Multi method. Don't know how to handle this in the case
-;; of no user name provided. Hack to make it work as it did before:
+;; HHH: Changed. Multi method. Don't know how to handle this in the case
+;; of no user name provided. Hack to make it work as it did before:
;; changed `user' to `(or user (user-login-name))' in the places where
;; the value is actually used.
(defun tramp-multi-connect-su (p method user host command)
@@ -5970,9 +5970,7 @@
base64-encode-region base64-decode-region)
("recode data..base64" "recode base64..data"
base64-encode-region base64-decode-region)
- ("uuencode xxx" "uudecode -o -"
- tramp-uuencode-region uudecode-decode-region)
- ("uuencode xxx" "uudecode -p"
+ ("uuencode xxx" "uudecode -o /dev/stdout"
tramp-uuencode-region uudecode-decode-region)
("uuencode xxx" "tramp_uudecode"
tramp-uuencode-region uudecode-decode-region)
@@ -6169,7 +6167,7 @@
(tramp-barf-if-no-shell-prompt
nil 30
"Couldn't `%s', see buffer `%s'" command (buffer-name)))
-
+
(defun tramp-wait-for-output (&optional timeout)
"Wait for output from remote rsh command."
(let ((proc (get-buffer-process (current-buffer)))
@@ -6482,9 +6480,9 @@
""))
-;; ------------------------------------------------------------
-;; -- TRAMP file names --
-;; ------------------------------------------------------------
+;; ------------------------------------------------------------
+;; -- TRAMP file names --
+;; ------------------------------------------------------------
;; Conversion functions between external representation and
;; internal data structure. Convenience functions for internal
;; data structure.
@@ -6495,7 +6493,7 @@
"Return t iff NAME is a tramp file."
(save-match-data
(string-match tramp-file-name-regexp name)))
-
+
;; HHH: Changed. Used to assign the return value of (user-login-name)
;; to the `user' part of the structure if a user name was not
;; provided, now it assigns nil.
@@ -6548,7 +6546,7 @@
If both MULTI-METHOD and METHOD are nil, do a lookup in
`tramp-default-method-alist'."
(or multi-method method (tramp-find-default-method user host)))
-
+
;; HHH: Not Changed. Multi method. Will probably not handle the case where
;; a user name is not provided in the "file name" very well.
(defun tramp-dissect-multi-file-name (name)
@@ -6720,7 +6718,7 @@
(if entry
(second entry)
(symbol-value param))))
-
+
;; Auto saving to a special directory.
@@ -6912,9 +6910,9 @@
process flag)))
-;; ------------------------------------------------------------
-;; -- Kludges section --
-;; ------------------------------------------------------------
+;; ------------------------------------------------------------
+;; -- Kludges section --
+;; ------------------------------------------------------------
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
;; does not deal well with newline characters. Newline is replaced by
@@ -7177,7 +7175,7 @@
;; strange when doing zerop, we should kill the process and start
;; again. (Greg Stark)
;; * Add caching for filename completion. (Greg Stark)
-;; Of course, this has issues with usability (stale cache bites)
+;; Of course, this has issues with usability (stale cache bites)
;; -- <daniel@danann.net>
;; * Provide a local cache of old versions of remote files for the rsync
;; transfer method to use. (Greg Stark)
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with tramp and uuencode-decode
2004-11-05 0:37 ` Han Boetes
@ 2004-11-05 12:43 ` Kim F. Storm
2004-11-05 14:52 ` Kai Grossjohann
1 sibling, 0 replies; 6+ messages in thread
From: Kim F. Storm @ 2004-11-05 12:43 UTC (permalink / raw)
Han Boetes <han@mijncomputer.nl> writes:
> I really start feeling like an emacs-hacker :-)
A nice feeling indeed :-)
>
> I also cleaned up some trailing whitespace in the meanwhile.
Please don't do this when submitting patches -- it makes it
impossible to judge the size and effect of the patch.
Since you haven't signed papers, we can only accept a few tiny
patches from you.
AFAICS, the only actual change was this Doc fix:
-Many systems support `uudecode -o -' for this or `uudecode -p', but
-some systems don't, and for them we have this shell function.")
+Many systems support `uudecode -o /dev/stdout', but some systems
+don't, and for them we have this shell function.")
Is that correct?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with tramp and uuencode-decode
2004-11-05 0:37 ` Han Boetes
2004-11-05 12:43 ` Kim F. Storm
@ 2004-11-05 14:52 ` Kai Grossjohann
2004-11-05 15:21 ` Han Boetes
1 sibling, 1 reply; 6+ messages in thread
From: Kai Grossjohann @ 2004-11-05 14:52 UTC (permalink / raw)
Han Boetes <han@mijncomputer.nl> writes:
> Please apply this patch: [using "-o /dev/stdout" instead of "-o -"
> because of Posix compliance]
I suggest not to replace "-o -" with "-o /dev/stdout". Instead, add
another entry in the list so that "-o /dev/stdout" is tried first,
then "-o -".
It is important for Tramp to work with as many remote systems as
possible, even non-Posix ones. There are users who wish to access AIX
and IRIX systems, and these are very different from what you are
accustomed to.
Kai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with tramp and uuencode-decode
2004-11-05 14:52 ` Kai Grossjohann
@ 2004-11-05 15:21 ` Han Boetes
0 siblings, 0 replies; 6+ messages in thread
From: Han Boetes @ 2004-11-05 15:21 UTC (permalink / raw)
Kai Grossjohann wrote:
> Han Boetes <han@mijncomputer.nl> writes:
>
> > Please apply this patch: [using "-o /dev/stdout" instead of
> > "-o -" because of Posix compliance]
>
> I suggest not to replace "-o -" with "-o /dev/stdout". Instead,
> add another entry in the list so that "-o /dev/stdout" is tried
> first, then "-o -".
>
> It is important for Tramp to work with as many remote systems as
> possible, even non-Posix ones. There are users who wish to
> access AIX and IRIX systems, and these are very different from
> what you are accustomed to.
That's sound logic, here is a new patch.
# Han
* looking for lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263 to compare with
* comparing to lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
M lisp/net/tramp.el
* modified files
--- orig/lisp/net/tramp.el
+++ mod/lisp/net/tramp.el
@@ -1535,8 +1535,9 @@
rm -f /tmp/tramp.$$
}"
"Shell function to implement `uudecode' to standard output.
-Many systems support `uudecode -o -' for this or `uudecode -p', but
-some systems don't, and for them we have this shell function.")
+Many systems support `uudecode -o /dev/stdout,' `uudecode -p' or
+`uudecode -o -' for this, but some systems don't, and for them we
+have this shell function.")
;; Perl script to implement `file-attributes' in a Lisp `read'able
;; output. If you are hacking on this, note that you get *no* output
@@ -5970,10 +5971,12 @@
base64-encode-region base64-decode-region)
("recode data..base64" "recode base64..data"
base64-encode-region base64-decode-region)
- ("uuencode xxx" "uudecode -o -"
+ ("uuencode xxx" "uudecode -o /dev/stdout"
tramp-uuencode-region uudecode-decode-region)
("uuencode xxx" "uudecode -p"
tramp-uuencode-region uudecode-decode-region)
+ ("uuencode xxx" "uudecode -o -"
+ tramp-uuencode-region uudecode-decode-region)
("uuencode xxx" "tramp_uudecode"
tramp-uuencode-region uudecode-decode-region)
("tramp_encode_with_module" "tramp_decode_with_module"
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-11-05 15:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-04 15:31 problem with tramp and uuencode-decode Han Boetes
2004-11-04 20:47 ` Han Boetes
2004-11-05 0:37 ` Han Boetes
2004-11-05 12:43 ` Kim F. Storm
2004-11-05 14:52 ` Kai Grossjohann
2004-11-05 15:21 ` Han Boetes
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).