[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: *shell* TAB *Completions* fooled by $PWD/

From: Richard Stallman
Subject: Re: *shell* TAB *Completions* fooled by $PWD/
Date: Thu, 11 Jul 2002 06:01:23 -0600 (MDT)

    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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]