[ESS] iESS[Stata] quirks

Martin Maechler maechler at stat.math.ethz.ch
Tue Oct 21 11:13:48 CEST 2008

>>>>> "BH" == Brendan Halpin <brendan.halpin at ul.ie>
>>>>>     on Mon, 20 Oct 2008 16:36:10 +0100 writes:

    BH> Rodney Sparapani <rsparapa at mcw.edu> writes:
    >> Rodney Sparapani wrote:
    >>> Hi Brendan:
    >>> I'm wondering if it is even worth watching for the '#delimit ;' command.
    >>> For example, you may not be running the whole buffer, rather, you may
    >>> be selecting certain lines to run.  And, if you come across a ';' that
    >>> is not part of a string literal, then it must be a line ending, right?
    >>> Thanks,
    >>> Rodney
    >> I'd like to try this.  Can some nice person from ESS core give me a
    >> hint as to how to do this?  I'm assuming that this would be a hack
    >> in some function in ess-inf.el  At first, I thought that it might
    >> be inferior-ess, but after looking at it, I don't think so.  A
    >> little help?

    BH> I'm not at all familiar with the core of ESS but I would look at
    BH> ess-eval-region in ess-inf.el. In fact, I suspect that the defun I
    BH> posted last week is hacked from an earlier version of this. 

    BH> Looking at ess-eval-region, I think the optimal thing could be to copy
    BH> the region to a buffer, manipulate it appropriately (e.g. insert a
    BH> #delimit command at the top) and then send that buffer via
    BH> process-send-region. 

    BH> Caveats: I don't know how to cleanly modify the defun for one language
    BH> and not another; also I have no idea how it might mess up functions that
    BH> call ess-eval-region.

Yes, the changes should definitely only be active when in "inferior-stata-mode"

I think even easier in that case would be to *prepend* the
(ess-eval-region ....) call by a simple

   (ess-eval-linewise "#delimit\n")

in the case of Stata.
"Un"fortunately, I have no Stata available to try it out, so I'm
reluctant to do these changes.

Rodney, maybe we can do this together (with Brendan involved, if
he wants) without having to echo everything to ESS-help ?

Martin Maechler

More information about the ESS-help mailing list