bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

minor ido enhancements


From: Sean O'Rourke
Subject: minor ido enhancements
Date: Wed, 16 Mar 2005 13:14:12 -0800
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (darwin)

The following small changes to lisp/ido.el avoid a tramp connection
caused by file-directory-p when the host matches
ido-is-slow-ftp-host.  The actual diff is only about 4-5 lines, so
hopefully it won't require papers.

/s

(defun ido-nonreadable-directory-p (dir)
  ;; Return t if dir is a directory, but not readable
  ;; Do not check for non-readable directories via tramp, as this
  ;; causes a premature connect on incomplete tramp paths (after
  ;; entring just "method:").
  (and (ido-final-slash dir)
       (or (ido-is-slow-ftp-host dir)
           (not (and (file-directory-p dir) (file-readable-p dir))))))

(defun ido-directory-too-big-p (dir)
  ;; Return t if dir is a directory, but too big to show.  Do not
  ;; check via tramp, but just pessimistically return true.
  (let ((ido-enable-tramp-completion nil))
    (and (numberp ido-max-directory-size)
         (ido-final-slash dir)
         (or (ido-is-slow-ftp-host dir)
             (and (file-directory-p dir)
                  (> (nth 7 (file-attributes dir)) ido-max-directory-size))))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]