From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: Re: I miss ange-ftp ($#@!Tramp) Date: Tue, 26 Nov 2002 13:03:46 +0000 (UTC) Sender: emacs-devel-admin@gnu.org Message-ID: References: <7AA5242A-00C4-11D7-9700-0003936772EE@clay-jones.com> <847kf0wzqm.fsf@lucy.cs.uni-dortmund.de> Reply-To: bob@rattlesnake.com NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1038316157 27796 80.91.224.249 (26 Nov 2002 13:09:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 26 Nov 2002 13:09:17 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18GfSj-0007E9-00 for ; Tue, 26 Nov 2002 14:09:13 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18GfYq-0000A0-00 for ; Tue, 26 Nov 2002 14:15:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18GfO6-00013X-00; Tue, 26 Nov 2002 08:04:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18GfNe-0000r1-00 for emacs-devel@gnu.org; Tue, 26 Nov 2002 08:03:58 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18GfNb-0000qc-00 for emacs-devel@gnu.org; Tue, 26 Nov 2002 08:03:57 -0500 Original-Received: from megalith.rattlesnake.com ([140.186.114.245] helo=localhost) by monty-python.gnu.org with esmtp (Exim 4.10) id 18GfNY-0000q3-00 for emacs-devel@gnu.org; Tue, 26 Nov 2002 08:03:52 -0500 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.114) Tue, 26 Nov 2002 13:03:46 +0000 (UTC) Original-To: kai.grossjohann@uni-duisburg.de In-reply-to: <847kf0wzqm.fsf@lucy.cs.uni-dortmund.de> (kai.grossjohann@uni-duisburg.de) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9681 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9681 Oops! My apologies, I forgot to load the the *.el files instead of the *.elc files to avoid bytecode. Here is a new bug report, from a new instance of Emacs, with the *.el files loaded, and with a copy of the new debugger log and of the new *ftp emrc@bcn.net* buffer. The results were the same as before: I was able to visit and also save a remote file using ange-ftp, but I had to get out of the debugger first and then find the buried file. Using today's CVS snapshot, Tue, 2002 Nov 26 11:49 UTC GNU Emacs 21.3.50.48 (i686-pc-linux-gnu, X toolkit) started with /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)' First, I evaluated all the following: (progn (require 'tramp) (setq tramp-verbose 10) (setq tramp-debug-buffer t) (setq tramp-default-method "smx") ;; when running `emacs -q -l ... ' need to set this (custom-set-variables '(shell-prompt-pattern "^[^#$% ]*[#$%>] *"))) ;;; load the *.el files instead of the *.elc files to avoid bytecode (progn (load-file "/usr/local/share/emacs/21.3.50/lisp/comint.el") (load-file "/usr/local/share/emacs/21.3.50/lisp/emacs-lisp/cl.el") (load-file "/usr/local/src/emacs/lisp/net/ange-ftp.el") (load-file "/usr/local/src/emacs/lisp/net/tramp-uu.el") (load-file "/usr/local/src/emacs/lisp/net/tramp-vc.el") (load-file "/usr/local/src/emacs/lisp/net/tramp.el")) ;; [need passive mode for ftp with firewall] (setq ange-ftp-try-passive-mode t) ;; [set ange-ftp-default-user for ange-ftp] (custom-set-variables '(ange-ftp-default-user "ftp@gnu.org")) ;;; from emacs/lisp/net/ange-ftp.el ;;; This regexp takes care of real ange-ftp file names (with a slash ;;; and colon). ;;; Don't allow the host name to end in a period--some systems use /.: ;;;###autoload (or (assoc "^/[^/:]*[^/:.]:" file-name-handler-alist) (setq file-name-handler-alist (cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function) file-name-handler-alist))) ;;; This regexp recognizes absolute filenames with only one component, ;;; for the sake of hostname completion. ;;;###autoload (or (assoc "^/[^/:]*\\'" file-name-handler-alist) (setq file-name-handler-alist (cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function) file-name-handler-alist))) ;;; This regexp recognizes absolute filenames with only one component ;;; on Windows, for the sake of hostname completion. ;;; NB. Do not mark this as autoload, because it is very common to ;;; do completions in the root directory of drives on Windows. (and (memq system-type '(ms-dos windows-nt)) (or (assoc "^[a-zA-Z]:/[^/:]*\\'" file-name-handler-alist) (setq file-name-handler-alist (cons '("^[a-zA-Z]:/[^/:]*\\'" . ange-ftp-completion-hook-function) file-name-handler-alist)))) Then I visited a file with a command like this (I changed the name of the user and the destination): (find-file "/user@foo.net:~user/public_html/links.html" nil) This threw me into the debugger: Debugger entered--Lisp error: (error "Method `smx' didn't specify a connection function") signal(error ("Method `smx' didn't specify a connection function")) error("Method `%s' didn't specify a connection function" "smx") (or (assoc (quote tramp-connection-function) (assoc ... tramp-methods)) (error "Method `%s' didn't specify a connection function" (or multi-method method))) (second (or (assoc ... ...) (error "Method `%s' didn't specify a connection function" ...))) tramp-get-connection-function(nil "smx" "emrc" "bcn.net") (funcall (tramp-get-connection-function multi-method (tramp-find-method multi-method method user host) user host) multi-method method user host) (if (and p (processp p) (memq ... ...)) nil (when (and p ...) (delete-process p)) (funcall (tramp-get-connection-function multi-method ... user host) multi-method method user host)) (unless (and p (processp p) (memq ... ...)) (when (and p ...) (delete-process p)) (funcall (tramp-get-connection-function multi-method ... user host) multi-method method user host)) (let ((p ...) last-cmd-time) (save-excursion (set-buffer ...) (when ... ... ... ...)) (unless (and p ... ...) (when ... ...) (funcall ... multi-method method user host))) tramp-maybe-open-connection(nil nil "emrc" "bcn.net") (save-excursion (tramp-maybe-open-connection multi-method method user host) (set-buffer (tramp-get-buffer multi-method method user host)) tramp-file-exists-command) tramp-get-file-exists-command(nil nil "emrc" "bcn.net") (format (tramp-get-file-exists-command multi-method method user host) (tramp-shell-quote-argument path)) (tramp-send-command-and-check multi-method method user host (format (tramp-get-file-exists-command multi-method method user host) (tramp-shell-quote-argument path))) (zerop (tramp-send-command-and-check multi-method method user host (format ... ...))) (save-excursion (zerop (tramp-send-command-and-check multi-method method user host ...))) (let* ((v ...) (multi-method ...) (method ...) (user ...) (host ...) (path ...)) (when (tramp-ange-ftp-file-name-p multi-method method user host) (tramp-invoke-ange-ftp ... filename)) (save-excursion (zerop ...))) (with-parsed-tramp-file-name filename nil (when (tramp-ange-ftp-file-name-p multi-method method user host) (tramp-invoke-ange-ftp ... filename)) (save-excursion (zerop ...))) tramp-handle-file-exists-p(#("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) (if (tramp-handle-file-exists-p filename) (progn (save-excursion ...))) (when (tramp-handle-file-exists-p filename) (save-excursion (if ... ... ...))) (let* ((v ...) (multi-method ...) (method ...) (user ...) (host ...) (path ...)) (when (tramp-ange-ftp-file-name-p multi-method method user host) (tramp-invoke-ange-ftp ... filename)) (when (tramp-handle-file-exists-p filename) (save-excursion ...))) (with-parsed-tramp-file-name filename nil (when (tramp-ange-ftp-file-name-p multi-method method user host) (tramp-invoke-ange-ftp ... filename)) (when (tramp-handle-file-exists-p filename) (save-excursion ...))) (let (result) (with-parsed-tramp-file-name filename nil (when ... ...) (when ... ...)) result) tramp-handle-file-attributes(#("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) (nth 8 (tramp-handle-file-attributes filename)) (tramp-mode-string-to-int (nth 8 (tramp-handle-file-attributes filename))) (progn (tramp-mode-string-to-int (nth 8 ...))) (if (file-exists-p filename) (progn (tramp-mode-string-to-int ...))) (when (file-exists-p filename) (tramp-mode-string-to-int (nth 8 ...))) (let* ((v ...) (multi-method ...) (method ...) (user ...) (host ...) (path ...)) (when (tramp-ange-ftp-file-name-p multi-method method user host) (tramp-invoke-ange-ftp ... filename)) (when (file-exists-p filename) (tramp-mode-string-to-int ...))) (with-parsed-tramp-file-name filename nil (when (tramp-ange-ftp-file-name-p multi-method method user host) (tramp-invoke-ange-ftp ... filename)) (when (file-exists-p filename) (tramp-mode-string-to-int ...))) tramp-handle-file-modes(#("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) apply(tramp-handle-file-modes #("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) (progn (apply (cdr fn) args)) (unwind-protect (progn (apply ... args)) (set-match-data save-match-data-internal)) (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal))) (save-match-data (apply (cdr fn) args)) (catch (quote tramp-forward-to-ange-ftp) (save-match-data (apply ... args))) (if fn (catch (quote tramp-forward-to-ange-ftp) (save-match-data ...)) (tramp-run-real-handler operation args)) (let ((fn ...)) (if fn (catch ... ...) (tramp-run-real-handler operation args))) tramp-file-name-handler(file-modes #("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) file-modes(#("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) apply(file-modes #("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) (let ((inhibit-file-name-handlers ...) (inhibit-file-name-operation operation)) (apply operation args)) ange-ftp-run-real-handler(file-modes (#("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil))) (if fn (save-match-data (apply fn args)) (ange-ftp-run-real-handler operation args)) (let ((fn ...)) (if fn (save-match-data ...) (ange-ftp-run-real-handler operation args))) ange-ftp-hook-function(file-modes #("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) file-modes(#("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil)) after-find-file(nil t) find-file-noselect-1(# #("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil) nil nil #("/emrc@bcn.net:/home/emrc/public_html/links.html" 0 14 nil 14 24 (rear-nonsticky t field output inhibit-line-move-field-capture t) 24 47 nil) (1 -1)) find-file-noselect("/emrc@bcn.net:~emrc/public_html/links.html" nil nil nil) find-file("/emrc@bcn.net:~emrc/public_html/links.html" nil) eval((find-file "/emrc@bcn.net:~emrc/public_html/links.html" nil)) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) Also, the *ftp user@foo.net* buffer showed this: ftp> open bcn.net Connected to bcn.net. 220 uno.bcn.net FTP server (Version wu-2.6.2(1) Fri Feb 22 04:09:00 EST 2002) ready. user "emrc" Turtle Power! 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type ftp> 331 Password required for emrc. 230 User emrc logged in. ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> pwd 257 "/home/emrc" is current directory. ftp> passive on Passive mode on. ftp> get ~emrc /dev/null 227 Entering Passive Mode (209,213,0,60,141,214) 550 /home/emrc: not a plain file. ftp> cd /home/emrc/public_html/links.html/ 550 /home/emrc/public_html/links.html/: Not a directory. ftp> cd /home/emrc/public_html/links.html/ 550 /home/emrc/public_html/links.html/: Not a directory. ftp> cd /home/emrc/public_html/ 250 CWD command successful. ftp> ls -al /tmp/ange-ftp28936uye 227 Entering Passive Mode (209,213,0,60,234,100) 150 Opening ASCII mode data connection for /bin/ls. 226 Transfer complete. ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> type binary 200 Type set to I. ftp> get /home/emrc/public_html/links.html /tmp/ange-ftp2893678k 227 Entering Passive Mode (209,213,0,60,36,49) 150 Opening BINARY mode data connection for /home/emrc/public_html/links.html (11994 bytes). 226 Transfer complete. 11994 bytes received in 1.8 seconds (6.5 Kbytes/s) ftp> type ascii 200 Type set to A. ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> quote mdtm /home/emrc/public_html/links.html 213 20021126123916 ftp> *** ==> However, the visited file was in a buffer -- albeit buried -- and I was able to modify the visited remote file and save it. -- Robert J. Chassell Rattlesnake Enterprises http://www.rattlesnake.com GnuPG Key ID: 004B4AC8 http://www.teak.cc bob@rattlesnake.com