[ESS-bugs] ess-mode 12.09 [rev. 5167 (2012-09-24)]; R-object-tooltip not working (again)

Stefano Conti s.conti at gmx.co.uk
Sun Sep 30 17:41:13 CEST 2012


Dear Martin and Vitalie,

Very many thanks for your messages and insights.  I had no idea my query 
was going to ignite such an interesting discussion on the state of play 
with R object tool-tipping.

Thank you also for Vitalie's work-around to Erik's original 
R-object-tooltip code: this does appear to work for me in ESS 12.09.

To conclude, thank you kindly for all the time and effort put by the 
developers' team in ESS: IMHO a simply invaluable piece of software! 
All the best,

--
Stefano

On 29/09/12 14:39, Vitalie Spinu wrote:
>    >> Martin Maechler <maechler at stat.math.ethz.ch>
>    >> on Sat, 29 Sep 2012 15:02:08 +0200 wrote:
>
>    >>>>>> Vitalie Spinu <spinuvit at gmail.com>
>    >>>>>> on Sat, 29 Sep 2012 13:20:02 +0200 writes:
>
>    >> Hi,
>
>    >> The idea is great. I was actually planning to migrate it
>    >> into ESS12.09, but have never done that, because we didn't
>    >> get time for our ESSR support package. The package is
>    >> needed to replace the pseudo dispatch which Eric is now
>    >> using in ess-R-object-tooltip-alist, with R's generic
>    >> mechanism.
>
>    >> The function should also be further extended to allow
>    >> rotation of meaningfully information, str, summary,
>    >> methods arguments, may be even plots. Also it should work
>    >> in terminal, and that means to pop an electric buffer.
>
>    >> ----
>    >> In recent ESS there have been some internal changes and
>    >> tooltip-show-at-point was renamed into
>    >> ess-tooltip-show-at-point.
>
>    > {"they" knew that;  was already needed for ESS 12.04 }
>
> But the version on the site was still using tooltip-show-at-point.
>
>    > For that reason, I've also decided to use  ess-r-object-tooltip
>    > (lower case 'r') as the other functions there.
>
> We are not using -r- or -R- consistently. I made a couple of greps and
> it looks like -R- is used much more often, and mainly ess-r-args.el uses
> the first one. also the customization group is ess-R. So I would prefer
> to stick with ees-R-.
>
>    >> Here is a modified version
>    >> which works with 12.09:
>
>    > HOWEVER, the "error catching" does not work anyway for me (I do
>    > use an English locale in R), and so I see the error as a
>    > tooltip...
>    > ... which is actually ok;
>    > so we could also decide to  drop that whole
>
> Yes, that change was deliberate.  It's better to show the exact error.
>
>    >   (unless (re-search-forward "\(object .* not found\)\|unexpected" nil t)
>
>    > check. As I say above, it cannot work in a non-English locale,
>    > *and* it is not so bad if it does not work.  The error message
>    > "as tooltip" is not a problem.
>
> We cannot currently drop this because there must be a check for a
> class. And only after we have the class, we can move further. This is a
> pseudo-dispatch that I was talking about. This is why I wasn't in a
> hurry to move it into ESS a couple of months ago when I stumbled on
> it. It's much better to have an R generic, say essSummary, to retrieve
> the corresponding summary, instead of the
> ess-R-object-tooltip-alist. The best place for that is ESSR package of
> course. But we can implement it even now. Methods are cached in methods
> package and there is no interference with user's global environment.
>
> So one way to implement that would be to inject essSummary generic with
> a couple of useful methods. Then users can extend/modify the methods for
> whatever they are interested in.
>
> essSummary can have an additional argument (or arguments?) that would
> indicate the level and type of the summary. I have in mind a cycling
> work-flow. C-c C-g shows str, C-c C-g C-g shows summary, C-c C-g C-g C-g
> shows plot or table etc.
>
> The second approach would to try in turn a list of predefined functions
> ess-R-summary-functions ("str", "summary", "table", "plot"), a list
> which user can customize and add/remove summary functions.
>
> Then we can also implement a shortcut C-c C-g 3 that would jump to 3rd
> summary in the list. I hope I am clear enough.
>
> I think the second approach is the best. It is simpler, more powerful
> and also easier to implement. We won't need any dispatch whatsoever
> because all the summary functions are already generics, and user can add
> his own generics if needed.
>
>      Vitalie
>
>
>    >>>> Martin Maechler <maechler at stat.math.ethz.ch> on Sat, 29
>    >>>> Sep 2012 11:52:31 +0200 wrote:
>
>    >>>>>>>> Stefano Conti <s.conti at gmx.co.uk> on Fri, 28 Sep
>    >>>>>>>> 2012 18:44:07 +0100 writes:
>
>    >>>> Dear ESS developers team, Since upgrading to the latest
>    >>>> Emacs (latest version 24.2.1) ESS package (version
>    >>>> 12.09) I have been unable to get R (latest version
>    >>>> 2.15.1) object tooltips
>    >>>> (u. http://www.emacswiki.org/emacs/ESSToolTips) working
>    >>>> in ESS.
>
>    >>>> Specifically, upon invoking the ess-R-object-tooltip
>    >>>> command from within Emacs on any R script, I obtain the
>    >>>> "No ESS process is associated with this buffer now"
>    >>>> message from the mini-buffer.  Note that downgrading ESS
>    >>>> to its previous version (12.04-4) restored the
>    >>>> functionality of R object tooltips.
>
>    >>>> Hope the information above and below is helpful enough;
>    >>>> I am also copying Martin Maechler, whom I have
>    >>>> previously received help on a related issue from, in
>    >>>> this correspondence.
>
>    >>>> Thank you in advance for any assistance you may provide,
>    >>>> and sincere apologies for any cross-posting.  Kind
>    >>>> regards,
>
>    MM> Caro Stefano,
>
>    MM> as this extra functionality was never adopted in to ESS
>    MM> proper, we of course could not pay attention to its
>    MM> continued functioning.
>
>    MM> I think this is quite a nice idea that some, maybe even
>    MM> many people may want, and so I consider to add it to ESS
>    MM> proper, and then find out what goes wrong (in your
>    MM> case).  To adopt it into ESS, I'd also want a
>    MM> confirmation by Erik (the author, hence in CC) that he'd
>    MM> donate it to ESS as well.  Erik?
>
>    MM> Martin
>
>    MM> _______________________________________________ ESS-bugs
>    MM> ESS-bugs at r-project.org
>    MM> https://stat.ethz.ch/mailman/listinfo/ess-bugs
>
>    MM> _______________________________________________ ESS-core
>    MM> list: https://stat.ethz.ch/mailman/listinfo/ess-core
>



More information about the ESS-bugs mailing list