"^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|"
"^500 .*AUTH\\|^KERBEROS\\|"
"^504 Unknown security mechanism\\|"
- "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd
+ "^530 Please login with USER and PASS\\|" ; non kerberized vsFTPd
"^534 Kerberos Authentication not enabled\\|"
"^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT")
"Regular expression matching FTP messages that can be ignored."
(concat bestmatch "/")
bestmatch)))))
-;; Put these lines uncommmented in your .emacs if you want C-r to refresh
+;; Put these lines uncommented in your .emacs if you want C-r to refresh
;; ange-ftp's cache whilst doing filename completion.
;;
;;(define-key minibuffer-local-completion-map "\C-r" 'ange-ftp-re-read-dir)
;;; Define ways of getting at unmodified Emacs primitives,
;;; turning off our handler.
-(defun ange-ftp-run-real-handler (operation args)
- (let ((inhibit-file-name-handlers
- (cons 'ange-ftp-hook-function
- (cons 'ange-ftp-completion-hook-function
- (and (eq inhibit-file-name-operation operation)
- inhibit-file-name-handlers))))
- (inhibit-file-name-operation operation))
- (apply operation args)))
+;(defun ange-ftp-run-real-handler (operation args)
+; (let ((inhibit-file-name-handlers
+; (cons 'ange-ftp-hook-function
+; (cons 'ange-ftp-completion-hook-function
+; (and (eq inhibit-file-name-operation operation)
+; inhibit-file-name-handlers))))
+; (inhibit-file-name-operation operation))
+; (apply operation args)))
+
+(defalias 'ange-ftp-run-real-handler 'tramp-run-real-handler)
(defun ange-ftp-real-file-name-directory (&rest args)
(ange-ftp-run-real-handler 'file-name-directory args))
;; We used to follow symlinks on `file' here. Apparently it was done
;; because some FTP servers react to "ls foo" by listing the symlink foo
;; rather than the directory it points to. Now that ange-ftp-ls uses
- ;; "cd foo; ls" instead, this is not necesssary any more.
+ ;; "cd foo; ls" instead, this is not necessary any more.
(let ((beg (point))
(end (point-marker)))
(set-marker-insertion-type end t)
dir (and dir "/")
file))
(error "name %s didn't match" name))
- (let (drive dir file tmp)
+ (let (drive dir file tmp quote)
+ (if (string-match "\\`\".+\"\\'" name)
+ (setq name (substring name 1 -1)
+ quote "\"")
+ (setq quote ""))
(if (string-match "\\`/[^:]+:/" name)
(setq drive (substring name 1
(1- (match-end 0)))
(if tmp
(setq dir (subst-char-in-string ?/ ?. (substring tmp 0 -1) t)))
(setq file (file-name-nondirectory name))
- (concat drive
+ (concat quote drive
(and dir (concat "[" (if drive nil ".") dir "]"))
- file)))))
+ file quote)))))
;; (ange-ftp-fix-name-for-vms "/PUB$:/ANONYMOUS/SDSCPUB/NEXT/Readme.txt;1")
;; (ange-ftp-fix-name-for-vms "/PUB$:[ANONYMOUS.SDSCPUB.NEXT]Readme.txt;1" t)