Frédéric Bothamy <[EMAIL PROTECTED]> writes: > Hello Michael and Jerome,
Hi Frédéric, > The specific problem described is indeed solved with Tramp 2.0.48. But > there is another one if I try to insert in a tramp buffer the result > from a command, garbage is inserted. Here are the steps to reproduce the > problem: > > - I open a remote file using tramp ssh method, > /ssh:[EMAIL PROTECTED]:/Users/fred/Travail/2005/20050411/compterendu.txt > > - I try to insert the current date with "C-u Esc ! date", the string > inserted is: > > (nil 1 501 501 (16986 18875) ( > > while I would have expected it to be (as for a local file): > > lun avr 11 11:58:14 CEST 2005 I could reproduce the bug locally. Fixed in Tramp CVS; will appear with Tramp 2.0.49. If you want to check the fix you can apply the following patch: magdalene:~/src/tramp-stable/lisp> cvs diff -r 2.359.2.32 tramp.el Index: tramp.el =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v retrieving revision 2.359.2.32 retrieving revision 2.359.2.34 diff -u -r2.359.2.32 -r2.359.2.34 --- tramp.el 3 Apr 2005 16:48:45 -0000 2.359.2.32 +++ tramp.el 13 Apr 2005 20:02:16 -0000 2.359.2.34 @@ -3561,7 +3561,13 @@ (unless asynchronous (tramp-wait-for-output))) (unless asynchronous - (insert-buffer (tramp-get-buffer multi-method method user host))) + ;; We cannot use `insert-buffer' because the tramp buffer + ;; changes its contents before insertion due to calling + ;; `expand-file' and alike. + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string)))) (when error-buffer (save-excursion (unless (bufferp error-buffer) @@ -3571,7 +3577,11 @@ "cat /tmp/tramp.$$.err") (tramp-wait-for-output) (set-buffer error-buffer) - (insert-buffer (tramp-get-buffer multi-method method user host)) + ;; Same comment as above + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string))) (tramp-send-command-and-check multi-method method user host "rm -f /tmp/tramp.$$.err"))) (save-excursion > Thanks a lot for your work on Tramp. > > Fred Thanx for reporting the bug, and best regards, Michael. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]