From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#9793: 24.0.90; Unwanted tramp connection on eshell completion. Date: Sat, 22 Oct 2011 11:39:45 +0200 Message-ID: <87wrbxjrfi.fsf@gmx.de> References: <87r529a8g2.fsf@gmail.com> <871uu7lcv7.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319276455 9030 80.91.229.12 (22 Oct 2011 09:40:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2011 09:40:55 +0000 (UTC) Cc: 9793@debbugs.gnu.org, Thierry Volpiatto To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 11:40:51 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RHY4P-0003Li-2B for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2011 11:40:49 +0200 Original-Received: from localhost ([::1]:35590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHY4N-00066E-Tu for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2011 05:40:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHY4K-000669-Q3 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 05:40:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHY4J-00064H-JA for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 05:40:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHY4J-00064D-CN for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 05:40:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RHY5Z-0000dt-W3 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 05:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2011 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9793-submit@debbugs.gnu.org id=B9793.13192764792419 (code B ref 9793); Sat, 22 Oct 2011 09:42:01 +0000 Original-Received: (at 9793) by debbugs.gnu.org; 22 Oct 2011 09:41:19 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHY4s-0000cy-QT for submit@debbugs.gnu.org; Sat, 22 Oct 2011 05:41:19 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RHY4r-0000ci-7l for 9793@debbugs.gnu.org; Sat, 22 Oct 2011 05:41:18 -0400 Original-Received: (qmail invoked by alias); 22 Oct 2011 09:39:50 -0000 Original-Received: from p57BB86B3.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.134.179] by mail.gmx.net (mp052) with SMTP; 22 Oct 2011 11:39:50 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18QYsUc/XIQpsv1L7g+q+QFCVldQvclFytbpjqHVh IT6/YAvv2CK7Uv In-Reply-To: (Stefan Monnier's message of "Thu, 20 Oct 2011 16:43:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 22 Oct 2011 05:42:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53016 Archived-At: Stefan Monnier writes: >> Because you didn't load tramp. >> Connect first to your "trex" or anything else, then close this, and run >> eshell and retry the above. >> For me too, if i start emacs -Q and i go strait to eshell, all work fine. > > Ah, I see, I can reproduce it now: > > % emacs -Q > M-x load-library RET tramp RET > M-x eshell RET > cd /t TAB > > At that point, Tramp tried to connect to `tic' and to `tequila' (the > hosts mentioned in ~/.ssh/known_hosts that start with `t'). `pcomplete-dirs' uses `file-directory-p' as predicate, which is applied to all completion candidates. The following patch ought to fix it: --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs/lisp/pcomplete.el.~106161~ 2011-10-22 11:31:11.996458454 +0200 --- /home/albinus/src/emacs/lisp/pcomplete.el 2011-10-22 11:30:20.796204566 +0200 *************** *** 948,954 **** (defsubst pcomplete-dirs (&optional regexp) "Complete amongst a list of directories." ! (pcomplete-entries regexp 'file-directory-p)) ;; generation of completion lists --- 948,957 ---- (defsubst pcomplete-dirs (&optional regexp) "Complete amongst a list of directories." ! (pcomplete-entries regexp ! (lambda (dir) ! (or (file-remote-p (expand-file-name dir)) ! (file-directory-p dir))))) ;; generation of completion lists --8<---------------cut here---------------end--------------->8--- Comments? > Stefan Best regards, Michael.