[ESS] any way to speed up Emacs\ESS?
Martin Maechler
maechler at stat.math.ethz.ch
Tue Feb 17 14:38:23 CET 2009
>>>>> "DeepS" == Deepayan Sarkar <deepayan.sarkar at gmail.com>
>>>>> on Mon, 16 Feb 2009 09:42:20 -0800 writes:
DeepS> On 2/16/09, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>>
KDH> Put (setq ess-eval-visibly-p nil)
KDH> in your .emacs for
KDH> letting this be the default behaviour
>>
>> exactly. We have used this as our stats "department" default
>> forever.
>>
>> The only (?) reasons it's not the default in ESS are
>>
>> - because the "visibility-turned-on" option is more intuitive to
>> beginning users of ESS
DeepS> And when giving live R demos in presentations...
good point.
>> - to remain compatible to all previous versions of ESS
DeepS> I'm curious: does anyone know why things are slow with visibility
DeepS> turned on? It's presumably a emacs22 issue, because there were no
DeepS> speed issues in emacs21
You are right. I forgot about that (I've practically never seen
the speed problems, as I practically never use "the
visibility"), and AFAIK all other ESS-corers have forgotten as
well, or not found the time to follow up.
Help from ESS-helpers is very much appreciated.
DeepS> As an aside, I tried defining a (crude) alternative to ess-eval-region
DeepS> that loops through a region calling ess-eval-line-and-step (which has
DeepS> no speed penalty even with visibility):
DeepS> (defun myess-eval-region (start end)
DeepS> "Call ess-eval-line for each line overlapping region. "
DeepS> (interactive "r")
DeepS> (ess-force-buffer-current "Process to load into: ")
DeepS> (message "Starting evaluation... %s %s %s" start end (point))
DeepS> (goto-char start)
DeepS> (comint-bol)
DeepS> (while (< (point) end)
DeepS> (ess-eval-line-and-step)))
DeepS> Unfortunately, this seems to echo the whole region first, and then
DeepS> shows the results. Is there a simple way to force updating after each
DeepS> call? Inserting a call to (sleep-for) seems to work, but surely there
DeepS> is a better way:
probably, but all this looks like "horrible hack" / "workaround"
and should really not be needed.
Also, I've quickly looked at my (Ubuntu 8.10) version of
emacs-snapshot.
There, I get the impression that
comint-scroll-to-bottom-on-output which is an alias for
comint-move-point-for-output
also does not work. If I set it to 't', the *R* is still not
auto-scrolled when I send R code to the buffer.
.... arrrgh...
DeepS> (defun myess-eval-region (start end)
DeepS> "Call ess-eval-line for each line overlapping region. "
DeepS> (interactive "r")
DeepS> (ess-force-buffer-current "Process to load into: ")
DeepS> (message "Starting evaluation... %s %s %s" start end (point))
DeepS> (goto-char start)
DeepS> (comint-bol)
DeepS> (while (< (point) end)
DeepS> (progn
DeepS> (ess-eval-line-and-step)
DeepS> (sleep-for 0.001))))
DeepS> -Deepayan
DeepS> ______________________________________________
DeepS> ESS-help at stat.math.ethz.ch mailing list
DeepS> https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list