[ESS] transient mark mode

Martin Maechler maechler at stat.math.ethz.ch
Wed Jul 30 11:47:07 CEST 2008

>>>>> "TS" == tyler  <tyler.smith at mail.mcgill.ca>
>>>>>     on Tue, 29 Jul 2008 21:32:58 -0300 writes:

    TS> William Knebel <billk at metrumrg.com> writes:
    >> Our group uses emacs+ess to run R on a mac osx server (10.5.4). I have
    >> an unusual issue between two ESS settings.  We standardly set
    >> transient-mark-mode t
    >> When I use the above setting with
    >> ess-eval-visibly-p nil
    >> the text in emacs get highlighted appropriately use C-x space
    >> and gets submitted properly using C-x c C-x r but the text in the
    >> emacs buffer satys highlighted as though it was never submitted. Is
    >> this an interaction between these two options.  I would to be able to
    >> use these together. We are using R-2.7.1 and ess 5.3.7. 

    TS> Someone else asked about this on the list a while ago. I've had this in
    TS> my .emacs since then, and it seems to fix the issue, although perhaps
    TS> not optimally:

    TS> (defadvice ess-eval-region (after unmark-after-eval)
    TS> "Deactivate mark after sending region to the ESS process"
    TS> (deactivate-mark))

    TS> (ad-activate 'ess-eval-region)  

    TS> I think it might be better to add (deactivate-mark) in the body of
    TS> ess-eval-region, but maybe there's a good reason not to.

Hmm, yes....

Thank you, Tyler!

However, we (statistics group at ETH Zurich) have been using the
combination of these two options  
 	    transient-mark-mode t
	    ess-eval-visibly-p  nil
for a very long time,
and I think I would rather  *not*  want that deactivation of the mark.
After all, it's still your currrent region,
and the transient mark mode is there to mark your current
region, no?

But of course we could make it a  customizable option.

If you can give convincing reasons, we could even set the
default of that option to be the one you prefer
{as opposed to the current behavior}.

Martin Maechler, ETH Zurich

    TS> Cheers,
    TS> Tyler

More information about the ESS-help mailing list