[ESS-bugs] ess-eval-deactivate-mark doesn't work (patch included)

Martin Maechler maechler at stat.math.ethz.ch
Wed May 6 10:23:35 CEST 2009


>>>>> "DR" == David Reitter <david.reitter at gmail.com>
>>>>>     on Tue, 5 May 2009 16:36:58 -0400 writes:

    DR> I found that ess-eval-deactivate-mark set to nil does not do its job  
    DR> in the latest release, i.e. the region was deactivated after a C-c C-r.

Hi David,
thank you for the report.

I cannot confirm the bug that your patch is supposedly fixing.
Could it be that the problem is  Mac or even aquamacs specific?

What's the exact versions of Emacs and ESS you are using?

    DR> The patch below fixes the problem for me.

the patch does not seem unreasonable.
I'm just astonished that I think I do not see your bug.
For me, switching  ess-eval-deactivate-mark  from default t to
nil, does  indeed change the "transient-mark" behavior; i.e.,
the mark remains transiently visible after C-c C-r == ess-eval-region,

Also, (ess-eval-region) itself contains

  (if ess-eval-deactivate-mark
      (deactivate-mark))

at the end of sending the region via (ess-eval-linewise ..),
so why would (ess-eval-linewise ..) have to do that itself ?

Best regards,
Martin Maechler



    diff --git a/aquamacs/src/site-lisp/edit-modes/ess-mode/lisp/ess- 
    inf.el b/aquamacs/src/site-lisp/edit-modes/ess-mode/lisp/ess-inf.el
    index 72d9d7a..19f6796 100644
    --- a/aquamacs/src/site-lisp/edit-modes/ess-mode/lisp/ess-inf.el
    +++ b/aquamacs/src/site-lisp/edit-modes/ess-mode/lisp/ess-inf.el
    @@ -1035,7 +1035,8 @@ default 100 ms and be passed to \\[accept- 
    process-output]."
	 ;; else: "normal", non-DDE behavior:

	 ;; Use this to evaluate some code, but don't wait for output.
    -    (let* ((cbuffer (current-buffer))
    +    (let* ((deactivate-mark nil)
    +	   (cbuffer (current-buffer))
	       (sprocess (get-ess-process ess-current-process-name))
	       (sbuffer (process-buffer sprocess))
	       (text (ess-replace-in-string text-withtabs "\t" " "))



More information about the ESS-bugs mailing list