Stefan Monnier <[EMAIL PROTECTED]> writes:
> Sorry for not precisely describing what I meant by "precise recipe", but if
> you assume I'm a complete idiot, it helps ;-) : I don't use dired, so I have
> no idea how you did the copying from local to ftp.
Sorry, I assumed that you have all necessary tools to reproduce this
problem. I didn't expect you use neither dired nor ange-ftp with
ftp server. But remember that usually trying to describe the problem
without hope to reproduce it might be as difficult as describing
colors to the blind ;-)
> Also this kind of problem is often/usually dependent on the ftp server, so
> some amount of info about the ftp server(s) where this appears would help.
One of the FTP servers that returns an error in case when the file name is
used as a directory name is ProFTPD 1.2.9.
> Finally, I don't think I have write-access to any ftp server any more.
> Can I use sftp instead? How would I go about telling ange-ftp to use sftp?
AFAIK, sftp can't be used with ange-ftp, because there is no need to
support sftp in ange-ftp when TRAMP already handles it well.
> One more thing: if someone could reproduce (part of) the problem without
> dired, that would help (or if someone could edebug dired to see where the
> problem comes from).
I looked at the problem more closely, and every of dired and ange-ftp
in itself looks right, but the problem comes from their interaction.
> Oh, wait: could you get a backtrace (by setting setq debug-on-error or if
> that doesn't work, by setting debug-on-signal) ?
Yes, if it will help you:
Debugger entered--Lisp error: (ftp-error #("FTP Error: DIR failed: 550 /tmp/testfile:
Not a directory" 0 23 nil 23 57 (rear-nonsticky t field output
inhibit-line-move-field-capture t)))
signal(ftp-error (#("FTP Error: DIR failed: 550 /tmp/testfile: Not a directory" 0 23
nil 23 57 (rear-nonsticky t field output inhibit-line-move-field-capture t))))
(save-excursion (let (... ...) (pop-to-buffer ...) (goto-char ...) (select-window
cur)) (signal (quote ftp-error) (list ...)))
ange-ftp-error("localhost" "user" #("DIR failed: 550 /tmp/testfile: Not a directory"
0 12 nil 12 46 (inhibit-line-move-field-capture t field output rear-nonsticky t)))
(if no-error nil (ange-ftp-error host user (concat "DIR failed: " ...)))
(if (car (setq result ...)) (save-excursion (set-buffer ...) (erase-buffer) (if ...
... ... ...) (while ... ...) (goto-char 1) (run-hooks ...) (if parse ...) (run-hooks
...) (setq ange-ftp-ls-cache-file key ange-ftp-ls-cache-lsargs lsargs
ange-ftp-ls-cache-res ...) (if ... nil ange-ftp-ls-cache-res)) (if no-error nil
(ange-ftp-error host user ...)))
(unwind-protect (if (car ...) (save-excursion ... ... ... ... ... ... ... ... ...
...) (if no-error nil ...)) (ange-ftp-del-tmp-name temp))
(if (and ange-ftp-ls-cache-file (string-equal key ange-ftp-ls-cache-file) (or dumb
...)) ange-ftp-ls-cache-res (setq temp (ange-ftp-make-tmp-name host)) (if wildcard
(progn ... ...) (setq lscmd ...)) (unwind-protect (if ... ... ...)
(ange-ftp-del-tmp-name temp)))
(let* ((host ...) (user ...) (name ...) (key ...) (host-type ...) (dumb ...) result
temp lscmd parse-func) (if (string-equal name "") (setq name ...)) (if (and
ange-ftp-ls-cache-file ... ...) ange-ftp-ls-cache-res (setq temp ...) (if wildcard ...
...) (unwind-protect ... ...)))
(if parsed (let* (... ... ... ... ... ... result temp lscmd parse-func) (if ... ...)
(if ... ange-ftp-ls-cache-res ... ... ...)) (error "Should never happen. Please
report. Bug ref. no.: 1"))
(let* ((ange-ftp-this-file ...) (parsed ...)) (if parsed (let* ... ... ...) (error
"Should never happen. Please report. Bug ref. no.: 1")))
ange-ftp-ls("testfile" "--dired -ald" nil)
(if wildcard (let (...) (ange-ftp-ls ... switches nil nil t)) (ange-ftp-ls file
switches full))
(insert (if wildcard (let ... ...) (ange-ftp-ls file switches full)))
(if (and (not wildcard) (setq tem ...)) (ange-ftp-insert-directory
(ange-ftp-expand-symlink tem ...) switches wildcard full) (insert (if wildcard ...
...)))
(if parsed (if (and ... ...) (ange-ftp-insert-directory ... switches wildcard full)
(insert ...)) (ange-ftp-real-insert-directory file switches wildcard full))
(let ((short ...) (parsed ...) tem) (if parsed (if ... ... ...)
(ange-ftp-real-insert-directory file switches wildcard full)))
ange-ftp-insert-directory("testfile" "--dired -ald" nil nil)
apply(ange-ftp-insert-directory ("testfile" "--dired -ald" nil nil))
(progn (apply fn args))
(unwind-protect (progn (apply fn 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 fn args))
(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(insert-directory "testfile" "--dired -ald" nil nil)
apply(ange-ftp-hook-function insert-directory ("testfile" "--dired -ald" nil nil))
tramp-ftp-file-name-handler(insert-directory "testfile" "--dired -ald" nil nil)
apply(tramp-ftp-file-name-handler insert-directory ("testfile" "--dired -ald" nil
nil))
tramp-file-name-handler(insert-directory "testfile" "--dired -ald" nil nil)
insert-directory("testfile" "--dired -ald" nil nil)
(while --dolist-temp-- (setq f (car --dolist-temp--)) (setq --dolist-temp-- (cdr
--dolist-temp--)) (insert-directory f switches nil nil))
(let ((--dolist-temp-- file-list) f) (while --dolist-temp-- (setq f ...) (setq
--dolist-temp-- ...) (insert-directory f switches nil nil)))
(dolist (f file-list) (insert-directory f switches nil nil))
(if file-list (dolist (f file-list) (insert-directory f switches nil nil))
(insert-directory dir switches wildcard (not wildcard)))
(let ((opoint ...) (process-environment ...) end) (if (or dired-use-ls-dired ...)
(setq switches ...)) (if file-list (dolist ... ...) (insert-directory dir switches
wildcard ...)) (if (not ...) (save-excursion ... ... ... ... ... ...))
(dired-insert-set-properties opoint (point)) (unless (save-excursion ... ...) (let ...
...)) (save-excursion (goto-char opoint) (if ... ...) (when wildcard ...)))
dired-insert-directory("/ftp:[EMAIL PROTECTED]:/tmp/" "-ald" ("testfile"))
(let ((default-directory directory)) (dired-insert-directory directory (concat
dired-actual-switches "d") (list filename)))
(let (buffer-read-only opoint) (beginning-of-line) (setq opoint (point)) (let (...)
(dired-insert-directory directory ... ...)) (goto-char opoint) (when marker-char (let
... ...)) (goto-char opoint) (let (...) (if ... ... ...)) (forward-line -1) (if
dired-after-readin-hook (save-excursion ...)) (dired-move-to-filename))
(catch (quote not-found) (if (string= directory cur-dir) (progn ... ... ...) (if ...
... ...)) (let (buffer-read-only opoint) (beginning-of-line) (setq opoint ...) (let
... ...) (goto-char opoint) (when marker-char ...) (goto-char opoint) (let ... ...)
(forward-line -1) (if dired-after-readin-hook ...) (dired-move-to-filename)) nil)
(setq filename (if relative (file-relative-name filename directory)
(file-name-nondirectory filename)) reason (catch (quote not-found) (if ... ... ...)
(let ... ... ... ... ... ... ... ... ... ... ...) nil))
(let* ((opoint ...) (cur-dir ...) (orig-file-name filename) (directory ...) reason)
(setq filename (if relative ... ...) reason (catch ... ... ... nil)) (if reason
(goto-char opoint)) (not reason))
dired-omit-old-add-entry("/ftp:[EMAIL PROTECTED]:/tmp/testfile" 67 nil)
(if dired-omit-files-p (let (...) (if ... ... t)) (dired-omit-old-add-entry filename
marker-char relative))
dired-add-entry("/ftp:[EMAIL PROTECTED]:/tmp/testfile" 67)
apply(dired-add-entry ("/ftp:[EMAIL PROTECTED]:/tmp/testfile" 67))
(if (apply fun args) (setq success-list (cons ... success-list)))
(save-current-buffer (set-buffer buf) (if (apply fun args) (setq success-list ...)))
(with-current-buffer buf (if (apply fun args) (setq success-list ...)))
(while --dolist-temp-- (setq buf (car --dolist-temp--)) (setq --dolist-temp-- (cdr
--dolist-temp--)) (with-current-buffer buf (if ... ...)))
(let ((--dolist-temp-- ...) buf) (while --dolist-temp-- (setq buf ...) (setq
--dolist-temp-- ...) (with-current-buffer buf ...)))
(dolist (buf (dired-buffers-for-dir ... file)) (with-current-buffer buf (if ...
...)))
(let (success-list) (dolist (buf ...) (with-current-buffer buf ...)) success-list)
dired-fun-in-all-buffers("/ftp:[EMAIL PROTECTED]:/tmp/" "testfile" dired-add-entry
"/ftp:[EMAIL PROTECTED]:/tmp/testfile" 67)
dired-add-file("/ftp:[EMAIL PROTECTED]:/tmp/testfile" 67)
(progn (funcall file-creator from to dired-overwrite-confirmed) (if overwrite
(dired-remove-file to)) (setq success-count (1+ success-count)) (message "%s: %d of
%d" operation success-count total) (dired-add-file to actual-marker-char))
(condition-case err (progn (funcall file-creator from to dired-overwrite-confirmed)
(if overwrite ...) (setq success-count ...) (message "%s: %d of %d" operation
success-count total) (dired-add-file to actual-marker-char)) (file-error (progn ...
...)))
(let* ((overwrite ...) (dired-overwrite-confirmed ...) (actual-marker-char ...))
(condition-case err (progn ... ... ... ... ...) (file-error ...)))
(if (not to) (setq skipped (cons ... skipped)) (let* (... ... ...) (condition-case
err ... ...)))
(lambda (from) (setq to (funcall name-constructor from)) (if (equal to from) (progn
... ...)) (if (not to) (setq skipped ...) (let* ... ...)))("/home/user/testfile")
mapcar((lambda (from) (setq to (funcall name-constructor from)) (if (equal to from)
(progn ... ...)) (if (not to) (setq skipped ...) (let* ... ...)))
("/home/user/testfile"))
(let (to overwrite-query overwrite-backup-query) (mapcar (function ...) fn-list))
(let (failures skipped (success-count 0) (total ...)) (let (to overwrite-query
overwrite-backup-query) (mapcar ... fn-list)) (cond (failures ...) (skipped ...) (t
...)))
dired-create-files(dired-copy-file "Copy [-p]" ("/home/user/testfile") (lambda
(from) (expand-file-name (file-name-nondirectory from) target)) 67)
(if (and (consp into-dir) (functionp ...)) (apply (car into-dir) operation rfn-list
fn-list target (cdr into-dir)) (if (not ...) (error "Marked %s: target must be a
directory: %s" operation target)) (or into-dir (setq target ...)) (dired-create-files
file-creator operation fn-list (if into-dir ... ...) marker-char))
(let* ((fn-list ...) (rfn-list ...) (dired-one-file ...) (target-dir ...) (default
...) (target ...) (into-dir ...)) (if (and ... ...) (apply ... operation rfn-list
fn-list target ...) (if ... ...) (or into-dir ...) (dired-create-files file-creator
operation fn-list ... marker-char)))
dired-do-create-files(copy dired-copy-file "Copy [-p]" nil 67 nil nil)
(let ((dired-recursive-copies dired-recursive-copies)) (dired-do-create-files (quote
copy) (function dired-copy-file) (if dired-copy-preserve-time "Copy [-p]" "Copy") arg
dired-keep-marker-copy nil dired-copy-how-to-fn))
dired-do-copy(nil)
call-interactively(dired-do-copy)
--
http://www.jurta.org/emacs/
_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.nongnu.org/mailman/listinfo/tramp-devel