Search code examples
lispslime

emacs slime: Whats the equivalent of the up arrow in shells?


When I type something wrong in dos/linux and it yells at me I can push the up arrow and then modify my line - maybe it was missing a '-' or something. I just installed lispbox and up arrow moves the cursor up the REPL history. How do i put on the current line the last line I entered.

So like I type

+ 3 2

But obviously I meant

(+ 3 2)

How do I get it to say "+ 3 2" so I can just push "Home", "(", "End", ")"?

Or is there some MUCH easier M-x waaahFIXIT command for this?


Solution

  • Try

    (slime-repl-previous-input)
    

    which is bound to

    M-p
    

    by default. (Meta is normally the Alt key)

    M-p / M-n is standard for going backwards / forwards through history in emacs - it also works in the minibuffer too