[ESS] Color in terminal?

Manas Kaushik, M.D, M.Sc mkaushik at hsph.harvard.edu
Wed Apr 19 15:42:12 CEST 2006


Hi,

I guess this is more eclectic question and I might be asking too much but 
might be relevant for those who use Terminals e.g. Secure CRT to connect 
to UNIX servers (Solaris) to run Statistics programs.

While I see quite nice colors using ESS on Gnome terminal (X11 on Linux) 
but I dont see any colors at all in the terminal (say if I am using 'emacs 
-nw' in Linux terminal) or using secure CRT. Indeed the default pattern in 
which the comments are highlighted seems much better in this case because 
everything becomes quite similar to everything else in ESS mode .

I think the whole range of palette of colors is probably not supported but 
atleast 4 colors (RGBY) are in my terminal. I checked using M-x 
edit-faces. I am wondering if there is some setting (faces) that might be 
useful for such terminals.

I am attaching my custom.el (which is my initialization file) inline for 
your perusal.

thanks,
manas

ps: note that adding setnu.el can facilitate error checking

***************************************custom.el***********************
(setq minibuffer-max-depth nil)
(custom-set-variables)
;;(custom-set-faces)
(setq custom-face-default-form 'all)
(add-to-list 'load-path (expand-file-name "~/.xemacs/.elisp"))
(load-file (expand-file-name "~/.xemacs/setnu.el"))
(require 'setnu)
(setq setnu-mode t)
(load "~/.xemacs/kakro")
(load "~/.xemacs/color")

(autoload 'setnu-mode "~/.xemacs/.elisp/setnu" "Line Numbers." t)

(load "~/.elisp/ess-5.2.10/lisp/ess-site")
(add-hook 'text-mode-hook 'turn-on-setnu-mode)
(add-hook 'emacs-lisp-mode-hook 'turn-on-setnu-mode)
(add-hook 'ess-mode-hook 'turn-on-setnu-mode)

;;from http://www.emacswiki.org/cgi-bin/wiki/EnablingFontLock
(if (fboundp 'global-font-lock-mode)
  ;;   (global-font-lock-mode 1)        ; GNU Emacs
   (setq font-lock-auto-fontify t))   ; XEmacs

;; After adding this I get some colors on start up which I was not 
getting before.
(mapcar (lambda (dev)
           (when (eq 'tty (device-type dev))
             (set-device-class dev 'color)))
         (device-list))




More information about the ESS-help mailing list