From spinuvit at gmail.com  Wed Mar 14 10:57:46 2012
From: spinuvit at gmail.com (Vitalie Spinu)
Date: Wed, 14 Mar 2012 10:57:46 +0100
Subject: [Rd] [ESS] completion in [] (R internal completion fails)
In-Reply-To: <87399b4jld.fsf@gmail.com> (Vitalie Spinu's message of "Wed, 14
	Mar 2012 10:28:46 +0100")
References: <87ipi7mtb2.fsf@med.uni-goettingen.de> <87399b4jld.fsf@gmail.com>
Message-ID: <87r4wv33ol.fsf_-_@gmail.com>


Hello, 

I am forwarding this from ESS mailing list, as it's a failure of
internal R completion system:

This fails:

utils:::.assignLinebuffer('iris[iris$Spec')
utils:::.assignEnd(15)
utils:::.guessTokenFromLine()
utils:::.completeToken()
utils:::.retrieveCompletions() ## -> [1] "iris[iris$Spec"

This works

utils:::.assignLinebuffer('iris[ iris$Spec')  # note the space after [
utils:::.assignEnd(15)
utils:::.guessTokenFromLine()
utils:::.completeToken()
utils:::.retrieveCompletions() ## -> [1] "iris$Species"

Best, 
Vitalie.

>>>> Andreas Leha <andreas.leha at med.uni-goettingen.de>
>>>> on Wed, 14 Mar 2012 10:21:37 +0100 wrote:

  >> Hi all,
  >> I am seeing strange behaviour with completion inside [].

  >> Suppose I have
  >> ttt <- data.frame(aaa=1, bbb=1)
  >> and I want to run
  >> ttt$aaa[ttt$aaa == 1] <- 2

  >> then completion at this point fails:
  >> ttt$aaa[ttt$aa<TAB>

  >> On the other hand, strangly enough, this works as expected:
  >> ttt$aaa[ ttt$aa<TAB>

  >> Regards,
  >> Andreas

  >> ______________________________________________
  >> ESS-help at r-project.org mailing list
  >> https://stat.ethz.ch/mailman/listinfo/ess-help



[Rd] [ESS] completion in [] (R internal completion fails)
Vitalie Spinu