[ESS] How to assign function key

Patrick Connolly p_conno||y @end|ng |rom @||ng@hot@co@nz
Thu Feb 4 21:21:00 CET 2016


On Thu, 04-Feb-2016 at 11:57AM +0100, Martin Maechler wrote:

[...]

|> I think there are two (or more?) simultanous problems and we have not yet 
|> separated them:
|> 
|> 1) 'comint-kill-output  is not defined in today's emacs, and it seems
|>    			is *also* not defined in your initialization
|>    at the time where you call  (global-set-key [f7] 'comint-kill-output)
|> 
|>    but the (global-set-key [f7] ...)  syntax is otherwise correct
|> 
|> 2) (I guess) for unfortunate emacs-design reasons the *preferred*
|>         (define-key ess-mode-map ... ...)
|>    syntax may have to be different from the one for global-set-key,
|>    and so [f7] seems invalid in the (define-key .) case, but
|>         valid in the global-set-key one.
|> 	
|> 3) I use ESS/Emacs default  where C-c C-o is bound to  comint-delete-output
|>    which works fine.
|>    So I wonder why you want to maintain yourself two different versions of this.
|>    But that may have been very conscious.

It was, C-c C-o involves 3 key presses.  F7 involves one.

[...]

|> Alternatively (and more quickly, actually): Navigate to them in
|> your ~/.emacs file and
|> use C-x C-e (at their "end of function call" / "end of expression")
|> and the result is displayed in the mini buffer (and saved in
|> *Messages*).

This is what I get in *Messages*:

with (define-key ess-mode-map [f7] 'ess-comint-kill-output)
eval: Symbol's value as variable is void: ess-mode-map

with (global-set-key [f7] 'comint-kill-output)
comint-kill-output


So, does that mean I have to define 'comint-kill-output
somewhere/somehow?

Thanks for the help.


-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_  	         Average minds discuss events 
(:_~*~_:)                  Small minds discuss people  
 (_)-(_)  	                      ..... Eleanor Roosevelt
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.




More information about the ESS-help mailing list