From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: Re: *shell* TAB *Completions* fooled by $PWD/ Date: Thu, 11 Jul 2002 06:01:23 -0600 (MDT) Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <200207111201.g6BC1Nx16935@aztec.santafe.edu> References: <87vg7rutpk.fsf@jidanni.org> <200207081820.g68IKeP12935@aztec.santafe.edu> <87bs9hkatg.fsf@jidanni.org> <3D2C6579.3020005@ihs.com> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1026388904 26733 127.0.0.1 (11 Jul 2002 12:01:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 11 Jul 2002 12:01:44 +0000 (UTC) Cc: gnu-emacs-bug@moderators.isc.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Scdk-0006x3-00 for ; Thu, 11 Jul 2002 14:01:44 +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 17SceV-0003aO-00; Thu, 11 Jul 2002 08:02:31 -0400 Original-Received: from sjc3-1.relay.mail.uu.net ([199.171.54.122]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17ScdX-0003Sm-00 for ; Thu, 11 Jul 2002 08:01:32 -0400 Original-Received: from pele.santafe.edu by sjc3sosrv11.alter.net with ESMTP (peer crosschecked as: pele.santafe.edu [192.12.12.119]) id QQmxau09652 for ; Thu, 11 Jul 2002 12:01:31 GMT Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g6BC1NB16613; Thu, 11 Jul 2002 06:01:23 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g6BC1Nx16935; Thu, 11 Jul 2002 06:01:23 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: kevinr@ihs.com In-Reply-To: <3D2C6579.3020005@ihs.com> (message from Kevin Rodgers on Wed, 10 Jul 2002 10:48:57 -0600) 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:2621 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:2621 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. shell.el could temporarily bind process-environment to a modified value which incorporate's the shell's current directory before it does the completion. That would fix this particulr problem. However, in general shell programs can set various environment variables. If Emacs shell completion tries to do something with environment variables, it will be wrong a lot of the time. Emacs tracks the current directory but it does not track environment variable assignments. Perhaps this means that Shell mode commands should never expand environment variables. If we leave it for the shell to expand them, it will at least expand them consistently. What do people think about this? Are there cases where Shell mode commands that expand envvars which would be greatly missed?