From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: era eriksson Newsgroups: gmane.emacs.bugs Subject: shell.el: directory tracking can't cope with subshells Date: Thu, 5 Jun 2003 09:38:26 +0300 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <16094.58722.332637.810160@there.afraid.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1054795282 27330 80.91.224.249 (5 Jun 2003 06:41:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2003 06:41:22 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 05 08:41:21 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19NoR6-00076b-00 for ; Thu, 05 Jun 2003 08:41:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NoRs-00014L-Ap for gnu-bug-gnu-emacs@m.gmane.org; Thu, 05 Jun 2003 02:42:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19NoPD-00085x-FO for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2003 02:39:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19NoPA-000856-3K for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2003 02:39:22 -0400 Original-Received: from rhols66.adsl.netsonic.fi ([194.29.198.66] helo=there.afraid.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NoP9-000851-LO for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2003 02:39:19 -0400 Original-Received: from era by there.afraid.org with local (Exim 3.35 #1 (Debian)) id 19NoOL-0002SA-00 for ; Thu, 05 Jun 2003 09:38:29 +0300 Original-To: bug-gnu-emacs@gnu.org X-Mailer: VM 7.03 under Emacs 20.7.2 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5239 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5239 This bug report will be sent to the Free Software Foundation, not to your local site managers!! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. In GNU Emacs 20.7.2 (i386-debian-linux-gnu, X toolkit) of Fri Apr 5 2002 on cyberhq modified by Debian configured using `configure i386-debian-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes --with-x-toolkit=yes' Please describe exactly what actions triggered the bug and the precise symptoms of the bug: If I start a subshell in shell mode, and change directories inside that subshell, the directory tracking code in shell.el is unable to catch up with the previous state when I exit from the subshell and return to (the working directory of) the shell where I invoked the subshell. I do not have a ready fix for this, but I think it should be possible to add (a) code to handle "([b?a|k)sh" sort of like pushd; (b) code to handle "exit" (and maybe "suspend"?) kind of like a mix of popd and "cd -"; and (c) some sort of mechanics to keep a stack of directory stacks so that you can simulate the underlying directory stacks structure in the shells. As far as I can tell, the modifications should not be major, but I haven't tried to implement this. Maybe I'll follow up with a patch eventually. For the time being, please note this for the record, /* era */ -- Join the civilized world -- ban spam like we did! tee -a $HOME/.signature <$HOME/.plan >http://www.iki.fi/era/index.html