bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Environmental variable expansion - problems for Shares.


From: Kevin Rodgers
Subject: Re: Environmental variable expansion - problems for Shares.
Date: Mon, 08 Oct 2001 11:26:23 -0600

Steve Kemp wrote:
>   Under these operating systems shared directories are "hidden"
>  by suffixing their names with a "$" symbol.
> 
>   When attempting to use tab completion on these directory names
>  Emacs attempts to expand an environmental variable, and invariably
>  fails.
> 
>   For example a sample run might look like this:
> 
>   Emacs.exe -q -no-init-file
>   Ctrl-x Ctrl-f                   (find-file).
>   \\machine\C$\Win[TAB]           (attempt to tab complete, to Winnt).
> 
>   -> Error 'Substituting nonexistent environment variable ""'


File: emacs,  Node: File Names,  Next: Visiting,  Up: Files
...

   `$' in a file name is used to substitute environment variables.  For
example, if you have used the shell command `export FOO=rms/hacks' to
set up an environment variable named `FOO', then you can use
`/u/$FOO/test.c' or `/u/${FOO}/test.c' as an abbreviation for
`/u/rms/hacks/test.c'.  The environment variable name consists of all
the alphanumeric characters after the `$'; alternatively, it may be
enclosed in braces after the `$'.  Note that shell commands to set
environment variables affect Emacs only if done before Emacs is started.

   To access a file with `$' in its name, type `$$'.  This pair is
converted to a single `$' at the same time as variable substitution is
performed for single `$'.  The Lisp function that performs the
substitution is called `substitute-in-file-name'.  The substitution is
performed only on file names read as such using the minibuffer.

-- 
Kevin Rodgers <address@hidden>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             303-397-2807[voice]/705-4258[fax]



reply via email to

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