From deepayan.sarkar at gmail.com  Thu Apr 10 22:04:32 2008
From: deepayan.sarkar at gmail.com (Deepayan Sarkar)
Date: Thu, 10 Apr 2008 13:04:32 -0700
Subject: [Rd] autocompletion problem
In-Reply-To: <47FD6766.5090506@fhcrc.org>
References: <47FD3697.8070606@fhcrc.org>
	<eb555e660804091529w427f248cuf0a0fc97bb0aaac2@mail.gmail.com>
	<47FD6766.5090506@fhcrc.org>
Message-ID: <eb555e660804101304i78b19955l7354fd1db261a677@mail.gmail.com>

On 4/9/08, Herve Pages <hpages at fhcrc.org> wrote:

[...]

>  BTW are there any plans to deal with backquoted symbols/names?
>  There are currently 2 problems with this:
>
>   1. Completion will work and expand symbols or names that contain special
>      characters but without backquoting them:
>
>        xxx <- as.list(11:13)
>        names(xxx) <- letters[1:3]
>        names(xxx)[2] <- "2b"
>
>        > xxx$<TAB><TAB>    # <TAB> stands for a hit on the Tab key
>        xxx$2b  xxx$a   xxx$c
>        > xxx$2b            # I hit 2, then <TAB> gives me the b
>
>     Now if I hit <Enter>, of course I get:
>
>        Error: unexpected numeric constant in "xxx$2"
>
>   2. Completion of names after $ will not work if I've already backquoted
>      the partial name:
>
>        > xxx$`2<TAB><TAB><TAB>...  # nothing happens

1 will be hard to ``fix'' because of limitations in the various
backends (some of which are unable to insert text before the cursor).
Also, more checks will presumably slow things down, and it's not clear
that the benefits would be worth it.

2 might be doable; I'll look into it.

-Deepayan



[Rd] autocompletion problem
Deepayan Sarkar