all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* minor ido enhancements
@ 2005-03-16 21:14 Sean O'Rourke
  0 siblings, 0 replies; only message in thread
From: Sean O'Rourke @ 2005-03-16 21:14 UTC (permalink / raw)


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))))))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-16 21:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-16 21:14 minor ido enhancements Sean O'Rourke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.