From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alberto Newsgroups: gmane.emacs.bugs Subject: bug#10586: 23.3; cd in remote shell reset working directory to local home Date: Wed, 25 Jan 2012 09:02:50 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327479115 27012 80.91.229.12 (25 Jan 2012 08:11:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2012 08:11:55 +0000 (UTC) Bcc: rgm@gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 25 09:11:51 2012 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 1RpxxO-0008Gd-8B for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2012 09:11:50 +0100 Original-Received: from localhost ([::1]:50613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpxxM-0007W4-W1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2012 03:11:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:47129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpxxG-0007Vo-JQ for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 03:11:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpxxB-00081B-Qw for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 03:11:42 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpxxB-000817-M9 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 03:11:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rpxxa-0003DY-D0 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2012 03:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alberto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2012 08:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10586 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10586-submit@debbugs.gnu.org id=B10586.132747909912325 (code B ref 10586); Wed, 25 Jan 2012 08:12:02 +0000 Original-Received: (at 10586) by debbugs.gnu.org; 25 Jan 2012 08:11:39 +0000 Original-Received: from localhost ([127.0.0.1]:42542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpxxC-0003Ck-GP for submit@debbugs.gnu.org; Wed, 25 Jan 2012 03:11:39 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:57722 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpxx9-0003CV-Q4 for 10586@debbugs.gnu.org; Wed, 25 Jan 2012 03:11:36 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rpxwk-0008S4-JG for 10586@debbugs.gnu.org; Wed, 25 Jan 2012 03:11:10 -0500 Resent-Message-ID: <20255.47390.458372.316271@fencepost.gnu.org> Resent-Date: Wed, 25 Jan 2012 03:11:10 -0500 Resent-From: Glenn Morris Resent-To: 10586@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=YeGSHzw3ri0vIywbQIxz90EzSoOlVhdn6LO5XBbLmVo=; b=uw4av+b1s+mt/6JGBW03dAY8N+msgjPUtcEMIx8juxgW1ty1WKUJP95qz9utQmeVjv nUHxCl9QLlf4Mr2Bl72CnJ129S8ffhcaxMgTW996AKVyYqZeTNqxYx5aYFQ5Fu3RBcku uOtCrXQzqJnSsA/gE1+Z3rd4yDpbXA6hyts7A= In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list 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:55976 Archived-At: On 24 January 2012 19:19, Glenn Morris wrote: > Alberto wrote: > >> Open a remote folder, e.g. >> =A0 =A0 C-x C-f /onan:bin >> Open a remote shell there >> =A0 =A0 M-x shell >> Check with pwd that working directory is remote >> =A0 =A0 M-x pwd >> Execute in the shell cd >> =A0 =A0 > cd >> Check with pwd that working directory is now _local_ home >> =A0 =A0 M-x pwd > > I can't reproduce this using Tramp's scpc method and don't see how such > a thing could even be possible. Is your local home directory even > visible on the remote machine? I think there is a misunderstanding. Is not the bash shell that believes to be in the local home. But Emacs. What happens is that the shell buffer lose synchronization between the current dir of the shell and the variable that emacs to keep track of it (e.g. the one that is used to auto complete path in the shell). So if you want, typing pwd in the _shell_ gives the correct result, the remote home. M-x pwd instead returns the wrong result (the local home instead of something like /onan:~) > What tramp connection method are you > using? scpc This is my default so in that particular connection is not shown explicitly= . Does it happen with `emacs -Q'? Yes. It does. I run a separate test on a friend machine, the result is the = same. However I did a test with current emacs trunk (24.something). On that one the problem cannot be reproduced. >> After this happens the only way I found to fix the working directory >> is to kill the shell buffer and open it again. > > Depending on the shell you use, does not 'cd -' take you back to the > previous directory? That was a good guess in fact, "cd -" gets emacs to go back to the remote h= ome. I've tried again using explicitly scpc. If it can help, emacs prints the new folder as a message after every cd. When I do the procedure above - for cd it is printed ~ - for cd - it is printed /scpc:onan:bin Hope it helps. Regards --=20 Alberto Ingenito