1. comint-input-ring-size

Stephen Eglen stephen at anc.ed.ac.uk
Fri May 21 14:11:22 CEST 2004


Aloke Phatak writes:
 > 1. comint-input-ring-size
 > 
 > On Tue May 18 15:36:08 CEST 2004, Robin Hankin wrote:
 > > I have just found out (thanks Stephen!) that the correct way to do 
 > > this is to  put  (setq comint-input-ring-size 1024) in my .emacs 
 > > file.
 > 
 > Doesn't this set comint-input-ring-size globally?  How do we
 > go about setting this locally for an ESS process only?
 > 
 > For example, according to the ESS docs,
 > "An input history of the last few commands is maintained (by default the
 > last 50 commands are stored, although this can be changed by setting the
 > variable comint-input-ring-size in inferior-ess-mode-hook.) "
 > 
 > So, I tried the following (apologies for the naive lisp) in my .emacs
 > 
 > (setq inferior-ess-mode-hook '(lambda () (comint-input-ring-size
 > 1024)))

That's close, but you forget the setq; and it won't be buffer local.
Add the following in your .emacs and let us know if it works after
restarting.

(defun my-inf-ess-hook ()
  "My local settings for inferior ESS mode."
  (set (make-local-variable 'comint-input-ring-size) 1024)
  )

(add-hook 'inferior-ess-mode-hook 'my-inf-ess-hook)

For me, if I now do "M-x R",  and then in *R* buffer I do C-h v
comint-input-ring-size I see
----------------------------------------------------------------------
comint-input-ring-size's value is 1024
Local in buffer *R*; global value is 32

Documentation:
Size of input history ring.

Defined in `comint'.
----------------------------------------------------------------------

Stephen




More information about the ESS-help mailing list