[ESS] inferior-ess-hook and linum-mode

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Sun Nov 15 20:18:34 CET 2009


Vinh Nguyen <vqnguyen at uci.edu> wrote:

> dear ess-list,
> 
> this is my first attempt at hooks in emacs so please bear with me.  i
> have linum-mode on globally:
> (require 'linum)
> (global-linum-mode 1)
> 
> reason being that i can use 'M-g M-g' to go to a line very fast.
> however, i don't need this in the R console, iESS.  I prefer it to not
> have linum-mode on in the R session as I get to 1000s of lines easily,

> (defun turn-off-linum ()
> (linum-mode)
> )
> (add-hook 'inferior-ess-hook 'turn-off-linum)

this looks close, can you try:

(defun turn-off-linum ()
  (linum-mode 0))

(add-hook 'inferior-ess-hook 'turn-off-linum)

the only difference being to force it to turn off linum using arg 0.

Stephen



More information about the ESS-help mailing list