From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#3250: marked as done (23.0.93; tab completion flakey with tramp when insert-default-directory is nil) Date: Mon, 11 May 2009 15:40:07 +0000 Message-ID: References: <4A05BF3C.3060606@simplistix.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1242056407-26515-0" X-Trace: ger.gmane.org 1242057161 23735 80.91.229.12 (11 May 2009 15:52:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 May 2009 15:52:41 +0000 (UTC) To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 11 17:52:31 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M3Xnm-0006S8-RD for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 May 2009 17:52:30 +0200 Original-Received: from localhost ([127.0.0.1]:54826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3Xnm-0001Bv-7d for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 May 2009 11:52:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3XnS-00012N-Rl for bug-gnu-emacs@gnu.org; Mon, 11 May 2009 11:52:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3XnM-0000yp-4c for bug-gnu-emacs@gnu.org; Mon, 11 May 2009 11:52:04 -0400 Original-Received: from [199.232.76.173] (port=51358 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3XnL-0000yj-Vu for bug-gnu-emacs@gnu.org; Mon, 11 May 2009 11:52:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41900) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M3XnK-00028J-St for bug-gnu-emacs@gnu.org; Mon, 11 May 2009 11:51:59 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4BFpsm4030759; Mon, 11 May 2009 08:51:55 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4BFe7xo026557; Mon, 11 May 2009 08:40:07 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 3250 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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 Xref: news.gmane.org gmane.emacs.bugs:27828 Archived-At: This is a multi-part message in MIME format... ------------=_1242056407-26515-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 11 May 2009 11:33:21 -0400 with message-id and subject line Re: bug#3250: 23.0.93; tab completion flakey with tramp wh= en insert-default-directory is nil has caused the Emacs bug report #3250, regarding 23.0.93; tab completion flakey with tramp when insert-default-dir= ectory is nil to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 3250: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D3250 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1242056407-26515-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 9 May 2009 17:37:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n49Hb3ED030573 for ; Sat, 9 May 2009 10:37:04 -0700 Received: from mx10.gnu.org ([199.232.76.166]:39424) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M2qTu-0008JK-GH for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 13:37:02 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M2qTr-00030i-59 for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 13:37:01 -0400 Received: from server1.simplistix.co.uk ([89.151.125.140]:40891) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M2qTq-00030U-R3 for emacs-pretest-bug@gnu.org; Sat, 09 May 2009 13:36:59 -0400 Received: from [192.168.1.15] (cust162-dsl93-89-128.idnet.net [93.89.128.162]) by server1.simplistix.co.uk (Postfix) with ESMTPSA id C52364F8061 for ; Sat, 9 May 2009 18:36:57 +0100 (BST) Message-ID: <4A05BF3C.3060606@simplistix.co.uk> Date: Sat, 09 May 2009 18:37:00 +0100 From: Chris Withers User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: emacs-pretest-bug@gnu.org Subject: 23.0.93; tab completion flakey with tramp when insert-default-directory is nil Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) With the following in my .emacs: (setq insert-default-directory nil) tab completion when using tramp to access a remote file becomes flakey. It seems that the notion of the current working directory becomes lost, so tab completion ends up with doubled up directories, eg: /home/chris/afolder/afolder ...where afolder doesn't exist, resulting in errors such as the following: File error: tramp-handle-file-name-all-completions: Couldn't `cd /home/chris/afolder/afolder/' This doesn't happen right away, but I usually end up bumping into it when navigating around a folder structure by inserting .. a number of times in the minibuffer window. In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600) of 2009-05-02 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENG value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: GNUmakefile Minor modes in effect: shell-dirtrack-mode: t cua-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ------------=_1242056407-26515-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3250-done) by emacsbugs.donarmstrong.com; 11 May 2009 15:33:33 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4BFXR1f024767 for <3250-done@emacsbugs.donarmstrong.com>; Mon, 11 May 2009 08:33:29 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQFAJPhB0pLd+1m/2dsb2JhbACBUMssg34FhVk X-IronPort-AV: E=Sophos;i="4.40,328,1238990400"; d="scan'208";a="38399432" Received: from 75-119-237-102.dsl.teksavvy.com (HELO ceviche.home) ([75.119.237.102]) by ironport2-out.teksavvy.com with ESMTP; 11 May 2009 11:33:21 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 99105B52A1; Mon, 11 May 2009 11:33:21 -0400 (EDT) From: Stefan Monnier To: Chris Withers Cc: 3250-done@emacsbugs.donarmstrong.com, Chong Yidong Subject: Re: bug#3250: 23.0.93; tab completion flakey with tramp when insert-default-directory is nil Message-ID: References: <87zldkeifi.fsf@cyd.mit.edu> <4A074CDF.8050604@simplistix.co.uk> <87my9kehsx.fsf@cyd.mit.edu> <4A074FBE.9080808@simplistix.co.uk> <87ljp4oatq.fsf@cyd.mit.edu> <4A07585C.9090105@simplistix.co.uk> Date: Mon, 11 May 2009 11:33:21 -0400 In-Reply-To: <4A07585C.9090105@simplistix.co.uk> (Chris Withers's message of "Sun, 10 May 2009 23:42:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Okay, here's what I did: The recipe I used was: > emacs -Q C-x C-f C-a C-k TAB left right TAB left right TAB where you see that default-directory moves up one level each time the *Completions* buffer is refreshed. The patch below fixes the problem, Stefan --- simple.el.~1.986.~ 2009-05-03 21:41:00.000000000 -0400 +++ simple.el 2009-05-11 11:30:20.000000000 -0400 @@ -5851,20 +5851,23 @@ ;; after the text of the completion list buffer is written. (defun completion-setup-function () (let* ((mainbuf (current-buffer)) - (mbuf-contents (minibuffer-completion-contents)) - common-string-length) + (base-dir ;; When reading a file name in the minibuffer, - ;; set default-directory in the minibuffer - ;; so it will get copied into the completion list buffer. + ;; try and find the right default-directory to set in the + ;; completion list buffer. + ;; FIXME: Why do we do that, actually? --Stef (if minibuffer-completing-file-name - (with-current-buffer mainbuf - (setq default-directory - (file-name-directory (expand-file-name mbuf-contents))))) + (file-name-as-directory + (expand-file-name + (substring (minibuffer-completion-contents) + 0 (or completion-base-size 0)))))) + common-string-length) (with-current-buffer standard-output (let ((base-size completion-base-size)) ;Read before killing localvars. (completion-list-mode) (set (make-local-variable 'completion-base-size) base-size)) (set (make-local-variable 'completion-reference-buffer) mainbuf) + (if base-dir (setq default-directory base-dir)) (unless completion-base-size ;; This shouldn't be needed any more, but further analysis is needed ;; to make sure it's the case. ------------=_1242056407-26515-0--