From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: emacs-devel@gnu.org
Subject: Re: tiny patch to ange-ftp
Date: Thu, 22 Sep 2005 08:41:41 +0900 [thread overview]
Message-ID: <b4mslvyt2dm.fsf@jpl.org> (raw)
In-Reply-To: 877jdrnv2k.fsf-monnier+emacs@gnu.org
Hi,
Could you apply the patch to ange-ftp.el? I hope it is widely
tested by people who update-build Emacs everyday. It enables at
least me to upload files to remote hosts smoothly and I believe
it doesn't worsen things than now.
2005-09-21 Katsumi Yamaoka <yamaoka@jpl.org> (tiny change)
* net/ange-ftp.el (ange-ftp-insert-directory): Work with a single
file listing.
*** ange-ftp.el~ Wed Sep 14 21:52:07 2005
--- ange-ftp.el Wed Sep 21 23:39:58 2005
***************
*** 2324,2339 ****
;; This works around a misfeature of some versions of netbsd ftpd
;; where `ls' can only take one argument: either one set of flags
;; or a file/directory name.
- ;; FIXME: if we're trying to `ls' a single file, this fails since we
- ;; can't cd to a file. We can't fix this problem here, tho, because
- ;; at this point we don't know whether the argument is a file or
- ;; a directory. Such an `ls' is only every used (apparently) from
- ;; `insert-directory' when the `full-directory-p' argument is nil
- ;; (which seems to only be used by dired when updating its display
- ;; after operating on a set of files). We should change
- ;; ange-ftp-insert-directory so that this case is handled by getting
- ;; a full listing of the directory and extracting the line
- ;; corresponding to the requested file.
(unless (equal cmd1 ".")
(setq result (ange-ftp-cd host user (nth 1 cmd) 'noerror)))
(setq cmd1 cmd3)))
--- 2324,2329 ----
***************
*** 4489,4495 ****
(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)
--- 4479,4501 ----
(if wildcard
(let ((default-directory (file-name-directory file)))
(ange-ftp-ls (file-name-nondirectory file) switches nil nil t))
! ;; That `full' is nil means we're going to do `ls' for
! ;; a single file in the current directory.
! (if full
! (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 nil))
! (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 prev parent reply other threads:[~2005-09-21 23:41 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 ` tiny patch to ange-ftp Stefan Monnier
2005-09-08 3:57 ` Katsumi Yamaoka
2005-09-08 4:46 ` Katsumi Yamaoka
2005-09-08 20:50 ` Stefan Monnier
2005-09-21 23:41 ` Katsumi Yamaoka [this message]
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=b4mslvyt2dm.fsf@jpl.org \
--to=yamaoka@jpl.org \
--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).