From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: *shell* TAB *Completions* fooled by $PWD/ Date: Wed, 10 Jul 2002 10:48:57 -0600 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <3D2C6579.3020005@ihs.com> References: <87vg7rutpk.fsf@jidanni.org> <200207081820.g68IKeP12935@aztec.santafe.edu> <87bs9hkatg.fsf@jidanni.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1026319907 21057 127.0.0.1 (10 Jul 2002 16:51:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2002 16:51:47 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17SKgt-0005TW-00 for ; Wed, 10 Jul 2002 18:51:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17SKhc-0001Fy-00; Wed, 10 Jul 2002 12:52:32 -0400 Original-Received: from dfw7-1.relay.mail.uu.net ([199.171.54.106]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17SKe7-00016Z-00 for ; Wed, 10 Jul 2002 12:48:55 -0400 Original-Received: from mail.fu-berlin.de by dfw7sosrv11.alter.net with ESMTP (peer crosschecked as: mail.fu-berlin.de [160.45.11.165]) id QQmwxv06391 for ; Wed, 10 Jul 2002 16:49:00 GMT Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Wed, 10 Jul 2002 18:48:53 +0200 (MEST) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Wed, 10 Jul 2002 18:48:53 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 21 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: fu-berlin.de 1026319733 23074662 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:2594 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:2594 Miles Bader wrote: > In general, you can't rely on completion in shell-mode to know about the > exact internal state of the shell process, since there's no way for > emacs to figure that out (it tries to track the current directory, since > that's very important, but even that can sometimes get messed up). The > value of the PWD environment variable in emacs is just whatever value it > got at startup. The shell.el directory tracking mechanism could be modified to update the PWD environment variable as well as its internal variables. But unlike its internal variables, which can be local to the *shell* buffer, the environment variable's value is shared via the global process-environment Emacs variable. (And we have to consider the case when there's more than one *shell* buffer.) But perhaps Shell mode could make process-environment local to the *shell* buffer, so it would be free to update PWD. -- Kevin Rodgers