From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sean O'Rourke" Newsgroups: gmane.emacs.bugs Subject: minor ido enhancements Date: Wed, 16 Mar 2005 13:14:12 -0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111009874 23078 80.91.229.2 (16 Mar 2005 21:51:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Mar 2005 21:51:14 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 16 22:51:13 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBgPr-00006o-TI for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Mar 2005 22:51:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBgg1-0003av-JZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Mar 2005 17:07:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBgWr-0000Y5-JO for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 16:58:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBgWc-0000TA-I6 for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 16:58:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBgWa-0000Lh-Nh for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 16:57:56 -0500 Original-Received: from [132.239.1.56] (helo=mailbox4.ucsd.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DBfqB-0002Jt-Lu for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 16:14:07 -0500 Original-Received: from smtp.ucsd.edu (smtp-a.ucsd.edu [132.239.1.49]) by mailbox4.ucsd.edu (8.13.1/8.13.1) with ESMTP id j2GLE1lf034707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Mar 2005 13:14:02 -0800 (PST) Original-Received: from Sean-ORourkes-Computer.local ([128.54.51.52]) by smtp.ucsd.edu (8.12.10/8.9.3) with ESMTP id j2GLE0Tg000557 for ; Wed, 16 Mar 2005 13:14:01 -0800 (PST) Original-To: bug-gnu-emacs@gnu.org User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (darwin) X-Greylisting: NO DELAY (Trusted relay host); processed by UCSD_GL-v1.2 on mailbox4.ucsd.edu; Wed, 16 March 2005 13:14:02 -0800 (PST) X-MailScanner: PASSED (v1.2.8 26197 j2GLE1lf034707 mailbox4.ucsd.edu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geb-bug-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.bugs:10938 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:10938 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))))))