repeating previous command

Stephen Eglen stephen at inf.ed.ac.uk
Thu Jul 17 17:29:28 CEST 2003


bb2 at duke.edu writes:
 > Hello All,
 > 
 > I was wondering if there is  way of cycling through a list of 
 > previously repeated commands in order to avoid having to retype them. 
 > If I open R outside of Xemacs, then the up or down arrows accomplish 
 > this.  Once I'm in the Xemacs environment with ESS (the iESS R 
 > window), the same up or down arrow simply moves my cursor within the 
 > R buffer.  How can I can I scroll through previous commands inside of 
 > the iESS window?

Try the key sequence "M-p" (meta p):

M-p runs the command comint-previous-input
   which is an interactive compiled Lisp function in `comint'.
(comint-previous-input ARG)

Cycle backwards through input history.

 > A more general problem...I would like to avoid emailing this list 
 > with such trivial questions, but I am stumped as to how to find these 
 > answers without doing so.  There does not seem to be a searchable 
 > archive of previously emailed questions or a user manual that I have 
 > found with this level of detail (where I could look up keywords such 
 > as history, previous command, etc).

Not a direct answer to your question, but what works in one emacs mode
is well worth trying in another mode.  E.g. if you are in an emacs
shell (M-x shell) then M-n and M-p take you up and down through the
history of input to that shell.

Stephen




More information about the ESS-help mailing list