[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tramp and NT-Emacs with plink
From: |
Kai Großjohann |
Subject: |
Re: Tramp and NT-Emacs with plink |
Date: |
Thu, 26 Sep 2002 13:23:01 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Douglas Gray Stephens <address@hidden> writes:
> The file is encoded and transfered via plink to NT-emacs, but
> something in the decoding on the PC is not 100%. The buffer ends up
> correctly named, but empty. I can take the debug file, pull out the
> base64 details, put them in a buffer, and run base64-decode-region to
> see the expected results. I can insert ofther files.
Wah :-( The problem is the "echo are you awake" that's sent by
tramp-maybe-open-connection. And tramp-maybe-open-connection is
called by tramp-get-connection-property. What happens if you comment
out the call to tramp-maybe-open-connection in
tramp-get-connection-property?
I presume that there was a reason for this call to be there, but I
don't know what was the reason.
Hm.
Ah. I found another way to change it. Can you get the most recent
version from CVS? I'll commit in a jiffy. If not, here is the most
recent patch (after signature).
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
Index: lisp/tramp.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.229
diff -u -r2.229 tramp.el
--- lisp/tramp.el 25 Sep 2002 15:57:52 -0000 2.229
+++ lisp/tramp.el 26 Sep 2002 11:16:44 -0000
@@ -2977,7 +2977,8 @@
(with-parsed-tramp-file-name filename nil
(when (tramp-ange-ftp-file-name-p multi-method method user host)
(tramp-invoke-ange-ftp 'file-local-copy filename))
- (let ((trampbuf (get-buffer-create "*tramp output*"))
+ (let ((output-buf (get-buffer-create "*tramp output*"))
+ (tramp-buf (tramp-get-buffer multi-method method user host))
(rcp-program (tramp-get-rcp-program
multi-method
(tramp-find-method multi-method method user host)
@@ -2986,6 +2987,10 @@
multi-method
(tramp-find-method multi-method method user host)
user host))
+ (rem-enc (tramp-get-remote-encoding multi-method method user host))
+ (rem-dec (tramp-get-remote-decoding multi-method method user host))
+ (loc-enc (tramp-get-local-encoding multi-method method user host))
+ (loc-dec (tramp-get-local-decoding multi-method method user host))
tmpfil)
(unless (file-exists-p filename)
(error "Cannot make local copy of non-existing file `%s'"
@@ -2996,59 +3001,51 @@
(tramp-message-for-buffer
multi-method method user host
5 "Fetching %s to tmp file %s..." filename tmpfil)
- (save-excursion (set-buffer trampbuf) (erase-buffer))
+ (save-excursion (set-buffer output-buf) (erase-buffer))
(unless (equal
0
(apply #'call-process
rcp-program
- nil trampbuf nil
+ nil output-buf nil
(append rcp-args
(list
(tramp-make-rcp-program-file-name
user host
(tramp-shell-quote-argument path))
tmpfil))))
- (pop-to-buffer trampbuf)
+ (pop-to-buffer output-buf)
(error
(concat "tramp-handle-file-local-copy: `%s' didn't work, "
"see buffer `%s' for details")
- rcp-program trampbuf))
+ rcp-program output-buf))
(tramp-message-for-buffer
multi-method method user host
5 "Fetching %s to tmp file %s...done" filename tmpfil))
- ((and (tramp-get-remote-encoding multi-method method user host)
- (tramp-get-remote-decoding multi-method method user host))
+ ((and rem-enc rem-dec)
;; Use inline encoding for file transfer.
(save-excursion
;; Following line for setting tramp-current-method,
;; tramp-current-user, tramp-current-host.
- (set-buffer (tramp-get-buffer multi-method method user host))
+ (set-buffer tramp-buf)
(tramp-message 5 "Encoding remote file %s..." filename)
(tramp-barf-unless-okay
multi-method method user host
- (concat (tramp-get-remote-encoding
- multi-method method user host)
- " < " (tramp-shell-quote-argument path))
+ (concat rem-enc " < " (tramp-shell-quote-argument path))
nil 'file-error
"Encoding remote file failed, see buffer `%s' for details"
- (tramp-get-buffer multi-method method user host))
+ tramp-buf)
;; Remove trailing status code
(goto-char (point-max))
(delete-region (point) (progn (forward-line -1) (point)))
(tramp-message 5 "Decoding remote file %s..." filename)
- (let ((loc-enc (tramp-get-local-encoding
- multi-method method user host))
- (loc-dec (tramp-get-local-decoding
- multi-method method user host)))
(if (and (symbolp loc-dec) (fboundp loc-dec))
;; If local decoding is a function, we call it.
(let ((tmpbuf (get-buffer-create " *tramp tmp*")))
(set-buffer tmpbuf)
(erase-buffer)
- (insert-buffer (tramp-get-buffer multi-method method
- user host))
+ (insert-buffer tramp-buf)
(tramp-message-for-buffer
multi-method method user host
6 "Decoding remote file %s with function %s..."
@@ -3075,7 +3072,7 @@
(delete-file tmpfil2)))
(tramp-message-for-buffer
multi-method method user host
- 5 "Decoding remote file %s...done" filename))))
+ 5 "Decoding remote file %s...done" filename)))
(t (error "Wrong method specification for `%s'" method)))
tmpfil)))
- Re: Tramp and NT-Emacs with plink, (continued)
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Kai Großjohann, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Kai Großjohann, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Kai Großjohann, 2002/09/13
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/25
- Re: Tramp and NT-Emacs with plink, Kai Großjohann, 2002/09/25
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/26
- Re: Tramp and NT-Emacs with plink,
Kai Großjohann <=
- Re: Tramp and NT-Emacs with plink, Kai Großjohann, 2002/09/26
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/27
- Re: Tramp and NT-Emacs with plink, Kai Großjohann, 2002/09/28
- Re: Tramp and NT-Emacs with plink, Douglas Gray Stephens, 2002/09/28
RE: Tramp and NT-Emacs with plink, Thomas Haselberger, 2002/09/13