[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ange-ftp errors out for some directories
From: |
lawrence mitchell |
Subject: |
Re: ange-ftp errors out for some directories |
Date: |
Thu, 31 Jul 2003 15:49:41 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 |
Richard Stallman wrote:
> It appears that, for some reason, dired-actual-switches fails to
> be set.
> That is strange, because dired-mode should have set it.
> I wonder if the wrong buffer is current. Please type
> e (current-buffer) RET in the debugger and see.
> If it is the right buffer, then the question is how
> dired-actual-switches got to be nil. Debugging that probably requires
> examining its variables at various points in the execution sequence.
> See if dired-mode does get called. See if it sets
> dired-actual-switches. If yes, see if the value is correct there. If
> yes, see who sets it again later.
I finally got round to debugging this properly, it turned out
that both dired-actual-switches and the dired buffer were being
reset in ange-ftp-insert-directory. Specifically,
file-symlink-p seemed to do the resetting.
This patch fiexed the problem for me. However, I doubt that
it's the correct way to fix it.
--8<---------------cut here---------------start------------->8---
Index: ange-ftp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/ange-ftp.el,v
retrieving revision 1.50
diff -c -r1.50 ange-ftp.el
*** ange-ftp.el 7 Jul 2003 20:55:38 -0000 1.50
--- ange-ftp.el 31 Jul 2003 14:47:35 -0000
***************
*** 4433,4442 ****
(defun ange-ftp-insert-directory (file switches &optional wildcard full)
(let ((short (ange-ftp-abbreviate-filename file))
(parsed (ange-ftp-ftp-name (expand-file-name file)))
tem)
(if parsed
(if (and (not wildcard)
! (setq tem (file-symlink-p (directory-file-name file))))
(ange-ftp-insert-directory
(ange-ftp-expand-symlink
tem (file-name-directory (directory-file-name file)))
--- 4433,4447 ----
(defun ange-ftp-insert-directory (file switches &optional wildcard full)
(let ((short (ange-ftp-abbreviate-filename file))
(parsed (ange-ftp-ftp-name (expand-file-name file)))
+ (actual-switches dired-actual-switches)
+ (buffer (current-buffer))
tem)
(if parsed
(if (and (not wildcard)
! (prog1
! (setq tem (file-symlink-p (directory-file-name file)))
! (setq dired-actual-switches actual-switches)
! (set-buffer buffer)))
(ange-ftp-insert-directory
(ange-ftp-expand-symlink
tem (file-name-directory (directory-file-name file)))
--8<---------------cut here---------------end--------------->8---
--
lawrence mitchell <address@hidden>