From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: tiny patch to ange-ftp
Date: Fri, 02 Sep 2005 10:14:35 -0400 [thread overview]
Message-ID: <jwvwtlzimzg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <b4mbr3cs7vg.fsf@jpl.org> (Katsumi Yamaoka's message of "Fri, 02 Sep 2005 08:09:23 +0900")
> 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)
next parent reply other threads:[~2005-09-02 14:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b4mhde4fno0.fsf@jpl.org>
[not found] ` <m1br46adb8.fsf-monnier+emacs@gnu.org>
[not found] ` <b4mr7d2o3j1.fsf@jpl.org>
[not found] ` <b4mbr46t4o1.fsf@jpl.org>
[not found] ` <b4mslxi3sp8.fsf@jpl.org>
[not found] ` <b4mu0hxp3h9.fsf@jpl.org>
[not found] ` <m17jer7ikd.fsf-monnier+emacs@gnu.org>
[not found] ` <b4m1x4zeiw6.fsf@jpl.org>
[not found] ` <m18xz761ro.fsf-monnier+emacs@gnu.org>
[not found] ` <b4m1x4zuwmj.fsf@jpl.org>
[not found] ` <b4miry7ptpu.fsf@jpl.org>
[not found] ` <b4moe7yr42b.fsf@jpl.org>
[not found] ` <b4mmzninzyb.fsf@jpl.org>
[not found] ` <jwvek88ju9q.fsf-monnier+emacs@gnu.org>
[not found] ` <b4mbr3cs7vg.fsf@jpl.org>
2005-09-02 14:14 ` Stefan Monnier [this message]
2005-09-08 3:57 ` tiny patch to ange-ftp Katsumi Yamaoka
2005-09-08 4:46 ` Katsumi Yamaoka
2005-09-08 20:50 ` Stefan Monnier
2005-09-21 23:41 ` Katsumi Yamaoka
2005-09-22 15:06 ` Stefan Monnier
2005-09-29 0:00 ` Katsumi Yamaoka
2005-09-30 21:05 ` Stefan Monnier
2005-10-01 12:23 ` Katsumi Yamaoka
2005-10-02 16:04 ` Stefan Monnier
2005-10-03 11:04 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvwtlzimzg.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).