[ESS] ESS FAQ nominations Was: Changing the configuration of font colors

Vitalie S. vitosmail at rambler.ru
Mon Jun 8 22:31:12 CEST 2009

On Mon, 08 Jun 2009 16:16:25 +0200, Rodney Sparapani <rsparapa at mcw.edu>  

> And the winner is...
> Just cleaning this up and renaming the thread in cased you missed it...
>  >> John Maindonald wrote:
>  >>> #1. It took me quite a bit of searching, following clues provided by
>  >>> a message from Rodney Sparapani, that I could do the following
>  >>> to change the color scheme:
>  >>> (require 'ess-site)
>  >>> (require 'ess-font-lock)
>  >>> In ESS under emacs, one does
>  >>> <ESC>x M-x ess-font-lock- <RET> <RET>
>  >>> Five choices then appear.  I rather like wheat.
>  >>> Further choices can be added to the file ess-font-lock.el,
>  >>> or existing choice(s) modified.
>  >>> I could not find this stated in explicit detail anywhere.  I'd like
>  >>> to see it added to the FAQ, and probably also to the section
>  >>> about customizing emacs in the introductory document.
>  >>> The default is unsatisfactory if one is using a computer
>  >>> projector.
>  >> my nominations:
>  >> #2 Interactive SAS is not supported by SAS for Windows.
>  >> #3 When ESS[R] hangs, try C-g.
> John Maindonald wrote:
>> 4. How do I comment a region: M-;
>> 5. Indent region and undo: C-M-\   M-x 1
>> 6. What does one actually type when it says C-M-\
>> 7. How does ESS handle command line line history?  How do I get a  
>> history
>> transcript?
>> 8. I've heard that there are commands for doing clever things with  
>> transcript file?
>> How do I get these to work for me?
>> 9. Is there an R equivalent of M-x dired: (M-x ess-rdired)
>> 10. Somewhere in the documentation it notes that A-M-r will get the  
>> previous
>> history matching string.  What does the A mean?  (Actually, I do not  
>> know!)
>> 11. What are the five niftiest things that one can do with ESS?
> Any others?  Extra points for those with answers.

-- How do I get my syntax highlighting to work? (plenty of answers in ess  
-- How to enrich the syntax highlighting (as in R-wiki)? (there are a  
couple of ways proposed in ess mailing archive one based on regexps  
another by building an explicit list of keywords proposed a couple of  
weeks ago)
-- How to use Rtags? (there is a new feature in R, a recent post pointed  
out). I myself never have time to figure how tags in emacs and especially  
with ESS work. May be someone can briefly explain in the FAQ.

-- What are useful commands outside ESS to use with ESS?
     Occur (highlights regexpressions)
     M-/ (dabbrev-expand), Type the first few characters, then type M-/  
(dabbrev-expand),which expands the previous word by looking for the most  
recent word that matches.
     Anything else?

-- What are useful packages that could be used with ESS? And how to  
install them?
Here are a couple that I enjoy very much :

;;;__ ALLOUT a nifty outliner for code!!   
(require 'allout)
(allout-init t)
(require 'allout-widgets)
(defun my-allout-settings ()
    (setq allout-layout t)
    (setq allout-plain-bullets-string "*+")
    (setq allout-command-prefix "\C-c")
(dolist (hook (list 'emacs-lisp-mode-hook
   (add-hook hook 'my-allout-settings)) ; (-1 () : 1 0))))

;;;__ HidESHOW and HIDESHOWVIS (hide/show function code between curled  
brackets!) http://www.emacswiki.org/emacs/HideShow
; also discused quite somewhere in the list

(load-library "hideshow")
(dolist (hook (list 'emacs-lisp-mode-hook
   (add-hook hook '(lambda ()
		    (hs-minor-mode 1)
(autoload 'hideshowvis-enable "hideshowvis" "Highlight foldable regions")
(dolist (hook (list 'emacs-lisp-mode-hook
   (add-hook hook 'hideshowvis-enable))
(setq hs-special-modes-alist
       (cons '(ess-mode "{" "}"  nil nil) hs-special-modes-alist))
(defun ttn-hs-hide-level-1 ()
     (hs-hide-level 1)
     (forward-sexp 1))
(setq hs-hide-all-non-comment-function 'ttn-hs-hide-level-1)

;;;__ Highlight Parantheis  (nice tool for highlighting several enclosed  
paranthesis pairs)
;; http://www.emacswiki.org/cgi-bin/wiki/HighlightParentheses
(require 'highlight-parentheses)
(dolist (hook (list 'emacs-lisp-mode-hook
   (add-hook hook '(lambda ()

;;;__ VISIBLE BOOKMARKS  Places marks inside buffer as compared to native  
emacs bookmarks that are global  
(require 'bm)
(require 'bm-ext)
(global-set-key (kbd "<C-f4>") 'bm-toggle)
(global-set-key (kbd "<f4>")   'bm-next)
(global-set-key (kbd "<S-f4>") 'bm-previous)

;;;__ Anything  ( VERY COOL STUFF) There is a whole thread in ESS list on  
Anything (http://www.emacswiki.org/emacs/Anything)
(require 'anything)
(require 'anything-config) ; here are all the shortcuts!!
(global-set-key [f8] 'anything)
(setq anything-sources
       (list anything-c-source-imenu

-- How to use Sweave from ESS ?
;; M-n s to Sweave the file, then
;; M-n l to run latex on the results of Sweave, then
;; M-n p to make and display a postscript file , or
;; M-n P to make and display a PDF version.


More information about the ESS-help mailing list