[ESS] ess eval invisibly only for large blocks

Thomas Alexander Gerds tag at biostat.ku.dk
Tue Mar 8 10:03:28 CET 2011


following-up on the eva-invisible part of the recent discussion "ESS:
running blocks of script very slow":

1. instead of

"> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > "

I would really like to see

"> "

i.e. not a single "+" sign and then maybe get a message "R successfully
evaluated 43 lines" like AucTeX does it.


2. why not optionally make ess-eval-visibly-p dependent on the size of
the block?  I could achieve this temporarily by advising
ess-eval-linewise and ess-eval-region like this:

,----
| (defadvice ess-eval-linewise (before smart-toggle-visibly first activate)
|   (and (not (eq major-mode 'inferior-ess-mode)) (< (length text-withtabs) 300))
|       (setq invisibly nil)
|     (setq invisibly t)))
| 
| (defadvice ess-eval-region (before smart-toggle-visibly first activate)
|   (if (and (not (eq major-mode 'inferior-ess-mode)) (< (length (buffer-substring-no-properties start end) 300)))
|       (setq toggle t)
|     (setq toggle nil)))
`----

where '300' could be made a user option.

cheers
Thomas





-- 
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Oester Farimagsgade 5, 1014 Copenhagen, Denmark

email  <thomas.gerds at pubhealth.ku.dk>,
web    http://staff.pubhealth.ku.dk/~tag/index.html
office 15.2.07
fax    +45 35327907
phone  +45 35327914



More information about the ESS-help mailing list