[ESS] disable C-c C-b

Tyler Smith tyler.smith at eku.edu
Sat Nov 27 16:10:57 CET 2010

"Bond, Stephen" <Stephen.Bond at cibc.com> writes:

> After an hour of browsing emacs docs (since nobody responded within 24
> hours, I am serious about customer service :-)
> I did it differently:
> (put 'ess-eval-buffer 'disabled t)
> Note! (put 'eval-buffer 'disabled t) will not do the job

Martin's solution (below) is less likely to bite you, though. Disabling
ess-eval-buffer may give you surprises if there are any other functions
that call it within ess. Also, by 'unsetting' C-cC-b, you can still use
ess-eval-buffer if you every find you need to, using typing 

  M-x ess-eval-buffer

or using the menus. I don't use the menus much, but
presumably disabling a function will disable the menu item as well.



> -----Original Message-----
> From: Martin Maechler [mailto:maechler at stat.math.ethz.ch] 
> Sent: Friday, November 26, 2010 3:05 AM
> To: Bond, Stephen
> Cc: ess-help at stat.math.ethz.ch
> Subject: Re: [ESS] disable C-c C-b
>>>>>> "BS" == Bond, Stephen <Stephen.Bond at cibc.com>
>>>>>>     on Tue, 16 Nov 2010 16:51:05 -0500 writes:
>     BS> Please, advise how to disable C-c C-b, which I sometimes hit
>     BS> accidentally instead of C-n and it does bad things as I keep a
>     BS> lot of code in a single file. Thanks everybody.
> The following, put into your ~/.emacs  file 
> should work :
> (add-hook 'ess-mode-hook
> 	  '(lambda ()
> 	     (define-key ess-mode-map "\C-c\C-b" nil)))
>            ; instead of  'ess-eval-buffer

More information about the ESS-help mailing list