[ESS] ESS 5.14 and ?? shortcut syntax (and kludge in input-sender)

Martin Maechler maechler at stat.math.ethz.ch
Sat Aug 13 17:13:53 CEST 2011


2011/8/11 Андрей Парамонов <cmr.pent at gmail.com>:
> Great, thanks!
>
> I was however under impression that the solution is even simpler: if
> "?" handler was is smart enough to understand that it shouldn't
> process "??" prefix as well, no explicit call to help.search would
> probably be needed.

Sure,  and there's much more to it  .... patches are welcome ... :

library(Matrix)

 class?Matrix
 methods?show

also "should" work, and then there's *even* more,
see the (two different!) help pages for "?" and "??"

We (ess core) have believed that this needs a bit more of a re-write,
and we have been waiting -- for years -- for R to change and return
"higher-level" help objects with which we could work..
But there's even more:
As hopefully several of you know, R's support for *dynamic* help pages
is currently (and IIRC by design, hence also in the nearer future)
only available with the R-builtin https server, i.e. only for the
dynamically generated HTML...
which we (ESS developers) should also then start to support.

Next week, at "useR! 2011", on Monday, Stephen Eglen will hold a
tutorial about ESS
and maybe we'll find time to start looking at these issues in more depths..

Thank you, notably Vitalie, for your contributions!!
Martin


>
> Thanks for your quick and helpful response,
> Andrey Paramonov
>
> 2011/8/11 Vitalie Spinu <spinuvit.list at gmail.com>:
>>>
>>> No documentation for '?test' in specified packages and libraries:
>>> you could try '???test'
>>>
>>
>> This problem is annotated in ess-help.el, so developers are  aware of
>> it. It was not a priority probably.
>> It's indeed easy to address. I attach the patch which solves this issue.
>>
>> Since it's all about modification of 'inferior-R-input-sended' I would
>> like to point out another kludge in this command.
>>
>> If you type
>>
>> Sys.sleep(5)
>>
>> at R prompt emacs will froze for 5 second. It happens with any command
>> which takes time to execute.
>> I am sure this has been reported before.
>>
>> The problem stems from the fact that comint is waiting to delete the
>> double input (comint-process-echoes is set to 't' in *R* buffers, see
>> the doc).
>>
>> What happens is:  'inferior-R-input-sender' calls 'ess-eval-linewise'
>> which inserts the user input and double it (since it's already in the
>> buffer). Then comint is waiting to delete
>> the doubled input.
>>
>> The kludge is easy to correct, just call 'process-send-string' instead
>> of 'ess-eval-linewise'.  This will free emacs immediately.
>>
>> I incorporated these changes in ess-tracebug
>> (http://code.google.com/p/ess-tracebug/). You can toggle it on and off
>> with M-x ess-tracebug and see the difference.
>>
>> The patch bellow also corrects this kludge.
>>
>> Best,
>> Vitalie.
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>



More information about the ESS-help mailing list