* completion on environment variables?
@ 2009-09-21 16:53 Chelmite
2009-09-21 22:04 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Chelmite @ 2009-09-21 16:53 UTC (permalink / raw)
To: help-gnu-emacs
When I type a file name, I get the benefits of file name completion.
However, if my path starts with an environment variable, there's no
completion on the environment variable name.
Is there a way to get completion to work on environment variables?
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: completion on environment variables?
2009-09-21 16:53 completion on environment variables? Chelmite
@ 2009-09-21 22:04 ` Drew Adams
2009-09-22 2:19 ` Kevin Rodgers
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2009-09-21 22:04 UTC (permalink / raw)
To: 'Chelmite', help-gnu-emacs
> When I type a file name, I get the benefits of file name completion.
> However, if my path starts with an environment variable, there's no
> completion on the environment variable name.
> Is there a way to get completion to work on environment variables?
Upgrade to Emacs 23.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: completion on environment variables?
2009-09-21 22:04 ` Drew Adams
@ 2009-09-22 2:19 ` Kevin Rodgers
2009-09-22 5:52 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2009-09-22 2:19 UTC (permalink / raw)
To: help-gnu-emacs
Drew Adams wrote:
>> When I type a file name, I get the benefits of file name completion.
>> However, if my path starts with an environment variable, there's no
>> completion on the environment variable name.
>> Is there a way to get completion to work on environment variables?
>
> Upgrade to Emacs 23.
I think that feature has been around for quite some time -- it's definitely
available in Emacs 22.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: completion on environment variables?
2009-09-22 2:19 ` Kevin Rodgers
@ 2009-09-22 5:52 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2009-09-22 5:52 UTC (permalink / raw)
To: 'Kevin Rodgers', help-gnu-emacs
> >> When I type a file name, I get the benefits of file name
> >> completion. However, if my path starts with an environment
> >> variable, there's no completion on the environment variable name.
> >> Is there a way to get completion to work on environment variables?
> >
> > Upgrade to Emacs 23.
>
> I think that feature has been around for quite some time --
> it's definitely available in Emacs 22.
It depends what was meant.
In Emacs prior to 23 (and going way back, perhaps to the Big Gnubang), hitting
TAB will expand a complete env var to its value. For example, if I'm in
directory /toto/foo/ and I type $HOME, then TAB, and $HOME has value
/titi/tata/, then the minibuffer input changes to /titi/tata/.
(Actually, what happens is, at least conceptually, two steps: /toto/foo/$HOME ->
/toto/foo//titi/tata -> /titi/tata.)
But that's not really completion of an env var itself. It's expansion of a
complete env var to its value.
What I thought was meant was the following feature, added in Emacs 23:
With /toto/foo/ in the minibuffer, I type $H and hit TAB. My input is completed
to /toto/foo/$HOME (with /toto/foo/ dimmed). A minibuffer message says that this
input is complete but not unique.
A second TAB shows these possible completions, in buffer *Completions*: HOME,
HOMEDRIVE, HOMEPATH. I can complete to any of them. If I hit RET, then the input
sent is /toto/foo/$HOME, which after expansion (as before) is /titi/tata/. If
$HOMEPATH has value /baz/boom/, and I type P, then TAB, then RET, then the input
sent is /toto/foo/$HOMEPATH, which after expansion is /baz/boom/.
This is completion of the env var itself, that is, completion of an env var
prefix ($H) to a complete env var ($HOME), and then expansion to its value
(/titi/tata/). All that was available prior to Emacs 23 was expansion of a
complete env var ($HOME) to its value (/titi/tata/).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-22 5:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 16:53 completion on environment variables? Chelmite
2009-09-21 22:04 ` Drew Adams
2009-09-22 2:19 ` Kevin Rodgers
2009-09-22 5:52 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.