[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tiny patch to ange-ftp
From: |
Stefan Monnier |
Subject: |
Re: tiny patch to ange-ftp |
Date: |
Fri, 02 Sep 2005 10:14:35 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> Now I'm able to do things by setting `ange-ftp-send-hash' as nil
> and modifying `ange-ftp-insert-directory' slightly. However,
> I'm not satisfied with it. Though I'm making an effort at
> another work now, I'm going to tackle it again in the near
> future. It will be completed if the problem of which hash mark
> printing breaks the synchronous operation is solved.
> I'm currently using ange-ftp.el which corrected as follows:
Your patch looks like a good first step. I would check `full'
rather than (file-name-directory file) in order to determine whether to do
a full dir listing or to extract a single line.
Also I hoped that we would be able to use the cache so as to avoid doing the
full-listing+extract-line thingy repeatedly. Using ange-ftp-get-files
should do the trick here. But that can be changed later on.
Given that this fixes the problem mentioned in ange-ftp-send-cmd and should
be orthogonal to the problem of hash marks, I suggest we install your patch.
Any objections?
Stefan
> *** ange-ftp.el~ Thu Aug 11 21:55:21 2005
> --- ange-ftp.el Thu Sep 1 23:08:06 2005
> ***************
> *** 4498,4504 ****
> (if wildcard
> (let ((default-directory (file-name-directory file)))
> (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
> ! (ange-ftp-ls file switches full))))
> (ange-ftp-real-insert-directory file switches wildcard full))))
> (defun ange-ftp-dired-uncache (dir)
> --- 4498,4519 ----
> (if wildcard
> (let ((default-directory (file-name-directory file)))
> (ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
> ! ;; That `file' doesn't have directory components means we're
> ! ;; going to do `ls' for a single file in the current directory.
> ! (if (file-name-directory file)
> ! (ange-ftp-ls file switches full)
> ! ;; Get a full listing of the current directory and extract
> ! ;; the line corresponding to `file'.
> ! (when (string-match "d\\'" switches)
> ! ;; Remove "d" which dired added to `switches'.
> ! (setq switches (substring switches 0 (match-beginning 0))))
> ! (setq tem (ange-ftp-ls "." switches full))
> ! (let ((case-fold-search nil))
> ! ;; Assume the file name which a single space precedes
> ! ;; appears at the end of a line.
> ! (if (string-match (concat "^.+ " (regexp-quote file) "$") tem)
> ! (concat (match-string 0 tem) "\n")
> ! ""))))))
> (ange-ftp-real-insert-directory file switches wildcard full))))
> (defun ange-ftp-dired-uncache (dir)
- Re: tiny patch to ange-ftp,
Stefan Monnier <=
- Re: tiny patch to ange-ftp, Katsumi Yamaoka, 2005/09/08
- Re: tiny patch to ange-ftp, Katsumi Yamaoka, 2005/09/08
- Re: tiny patch to ange-ftp, Stefan Monnier, 2005/09/08
- Re: tiny patch to ange-ftp, Katsumi Yamaoka, 2005/09/21
- Re: tiny patch to ange-ftp, Stefan Monnier, 2005/09/22
- Re: tiny patch to ange-ftp, Katsumi Yamaoka, 2005/09/28
- Re: tiny patch to ange-ftp, Stefan Monnier, 2005/09/30