5 sec wait on C-c C-l

S.McClatchie s.mcclatchie at niwa.cri.nz
Thu Mar 7 00:45:29 CET 2002


> System info:
> R Version 1.4.1  (2002-01-30) on Windows 2000
> ESS v. 5.1.20 using emacs ver. 21.1.1

Colleagues

I notice that the load time for an R-script from ESS on my windows 
machine is rather slow (order 5 sec for several different scripts). Is this 
time comparable for other users, or could there be a problem with my 
setup. If there could be a problem, what should I provide for error 
checking?

My .emacs intialisation file follows:

(load-file "C:/emacs-21.1/ess-5.1.20/lisp/ess-site.el")

; ESS and customization:
(show-paren-mode 1)                   ; parentheses highlighting
(setenv "SHELL" "C:\\bin\\bash") 

; latest functionality in color coding
(setq ess-sas-run-make-regexp nil)
(require 'ess-site "~/ess/lisp/ess-site")

(setq-default inferior-R-program-name "C:/Program 
Files/R/rw1041/bin/Rterm.exe")

;(setq ess-ask-for-ess-directory nil) 
(setq ess-ask-for-ess-directory t) ; smcc

(setq ess-execute-in-process-buffer t)
(make-local-variable 'comment-indent-function)
(setq-default comment-indent-function 'ess-comment-indent)

; added from http://stat.ethz.ch/ESS/ess_4.html#SEC31
(setq ess-source-directory
   (lambda ()
      (concat ess-directory "R-src/")))
; end addition

 (setq ess-delete-dump-files) ; smcc

; function template code
(add-hook 'ess-mode-hook 'ess-add-MM-keys)
(add-hook 'inferior-ess-mode-hook 'ess-add-MM-keys)
; Default function template
(setq ess-insert-function-templates t)

; Window size:
(set-frame-size (selected-frame) 72 55)

; Always auto-fill:
(setq-default auto-fill-function 'do-auto-fill)
(setq-default fill-column 79)

; Macros and set-keys:
(global-set-key "\C-u" 'query-replace-regexp)
(load "hscroll")
(defun flat (tabw) "Turns off line-wrap; prefix sets tab width."
  (interactive "p")
  (turn-on-hscroll) ; (setq truncate-lines 1)
  (if (> tabw 1) (setq tab-width tabw))
  (redraw-display))
(global-set-key "\C-c\C-f" 'flat)

; Fonts (uncomment the next line for a bolder font):
 (set-default-font
"-adobe-courier-bold-r-normal--*-140-*-*-m-*-iso8859-1")
(global-font-lock-mode t) 
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste 
it!
  ;; Your init file should contain only one such instance.
 '(case-fold-search t)
 '(current-language-environment "Latin-1")
 '(debug-on-error t)
 '(default-input-method "latin-1-prefix")
 '(global-font-lock-mode t nil (font-lock))
 '(save-place t)
 '(show-paren-mode t nil (paren))
 '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
 '(transient-mark-mode t)
 '(uniquify-buffer-name-style nil nil (uniquify)))
 
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(font-lock-comment-face ((((class color) (background light)) 
(:foreground "Firebrick"))))
 '(font-lock-constant-face ((((class color) (background light)) (:foreground 
"VioletRed"))))
 '(font-lock-function-name-face ((((class color) (background light)) 
(:foreground "VioletRed"))))
 '(font-lock-keyword-face ((((class color) (background light)) (:foreground 
"MediumBlue"))))
 '(font-lock-string-face ((((class color) (background light)) (:foreground 
"SeaGreen"))))
 '(font-lock-type-face ((((class color) (background light)) (:foreground 
"Goldenrod"))))
 '(font-lock-variable-name-face ((((class color) (background light)) 
(:foreground "Blue")))))

; new frame setup
; (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1) 
(set-default-font"-adobe-courier-bold-r-normal--*-140-*-*-m-*-iso8859-
1")))

; deal with kill buffer commands
(defun h-kill-buffer-query-function ()
  (or (not (get-buffer-process (buffer-name)))
      (yes-or-no-p (format "Kill process associated with %s? "
      (buffer-name)))))

(add-hook 'kill-buffer-query-functions
   'h-kill-buffer-query-function)

; split screen and run R in one window with output in other window
;(fset 'run-r "\C-x2\M-xR\C-m")
;(global-set-key "\M-r" 'run-r)


; provided by Rich Heiberger 3/04/02 to deal with C-c C-d problem
(defun ess-command (com &optional buf)
  "Send the ESS process command COM and delete the output from the 
ESS process buffer.  If an optional second argument BUF exists save 
the output in that buffer. BUF is erased before use. COM should have a 
terminating newline. Guarantees that the value of .Last.value will be 
preserved."
  (interactive)
  (if buf                ;;Mar 01 2002 rmh
      (save-excursion
 (set-buffer buf)
 (setq ess-local-process-name ess-current-process-name)))
  (if (not (ess-ddeclient-p))
      (ess-command-original com buf)
    (ess-force-buffer-current "Process to load into: ")
    (ess-command-ddeclient com buf)))

----------------------------------

Sincerely,

Sam

Sam McClatchie, 
Research scientist (fisheries acoustics))))))))))
http://www.smcc.150m.com/
NIWA (National Institute of Water & Atmospheric Research Ltd)
Postal address: PO Box 14 901, Kilbirnie, Wellington, New Zealand. 
Street address: 301 Evans Bay Parade, Greta Point, 6003 Wellington, New Zealand.
phone 64-04-386-0574, FAX: 64-4-386 0574. 
              /\
...>><xX(°> // \\
                 /// \\\   
                //// \\\\
               ///  <°)Xx><<
              /////  \\\\\\
        ><(((°>   
  >><(((°>   ...>><xX(°>O<°)Xx><<

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list