From: ·············@gmail.com
Subject: How to reprint the last command line
Date: 
Message-ID: <eb01abaa-f797-460e-af19-3854836769de@b1g2000hsg.googlegroups.com>
I am tired of copying and pasting the commands i have written just
before. Is there any shortcut key to print the last command in SLIME;
such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.

From: ······@gmail.com
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <9e74405c-59de-4662-bdf4-2dd1bec6bbc1@a70g2000hsh.googlegroups.com>
On Jun 11, 12:15 pm, ·············@gmail.com wrote:
> I am tired of copying and pasting the commands i have written just
> before. Is there any shortcut key to print the last command in SLIME;
> such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.

Alt-p
From: ·············@gmail.com
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <e4b0e989-34ae-49d4-b779-fc780fced36d@m44g2000hsc.googlegroups.com>
On Jun 11, 1:31 pm, ·······@gmail.com" <······@gmail.com> wrote:
> On Jun 11, 12:15 pm, ·············@gmail.com wrote:
>
> > I am tired of copying and pasting the commands i have written just
> > before. Is there any shortcut key to print the last command in SLIME;
> > such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.
>
> Alt-p

thanks mate! you have me got rid of a huge burden ! thanks again :)
From: David Golden
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <C3T3k.25789$j7.470107@news.indigo.ie>
·············@gmail.com wrote:

> On Jun 11, 1:31 pm, ·······@gmail.com" <······@gmail.com> wrote:
>> On Jun 11, 12:15 pm, ·············@gmail.com wrote:
>>
>> > I am tired of copying and pasting the commands i have written just
>> > before. Is there any shortcut key to print the last command in
>> > SLIME; such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.
>>
>> Alt-p
> 
> thanks mate! you have me got rid of a huge burden ! thanks again :)

Note that emacs shows all bindings available in the current mode if you
press C-h b   (that's control and h together, then b). The list can be
quite long, but it's an ordinary buffer, so C-s searching etc. works in
it.

You can also use C-h a (and C-h d) to find commands based on parts of
their name (or docs).   Not perfect, since to find the command you
wanted you'd need to have looked for "previous" rather than "last" then
scrolled through to find slime-repl-previous-input. 

Once you found the command, you could hit C-h w then enter
slime-repl-previous-input (it tab-completes like most inputs in emacs)
to find out it is bound to M-p.

You can  hit C-h k followed by a keypress to find out what that
keypress does e.g.  C-h k M-p

See C-h ? to learn more about the C-h commands.

Of course, the menu bar, if you have it turned on, shows the
basic slime repl commands including previous-input in the "REPL" menu,
and at least on typical systems, would show the M-p shortcut beside it.
(Menus are often used by users for "command discovery" these days in
desktop applications.  While menus are pretty much unworkable for a
system with the amount of commands emacs actually has, emacs mode
authors tend to be careful to include a few of the basic commands in a
mode-specific menu these days, so it can be worth turning the menu-bar
on if you find C-h b (or just (gasp) reading a mode's
documentation ;-)) overwhelming.  Though if you want to master emacs,
discarding the menu bar and tool bar crutches is probably better, and
frees up a few lines screen real state too...)
From: Rupert Swarbrick
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <g2qu5t$cn2$1@news.albasani.net>
David Golden <············@oceanfree.net> writes:

> Of course, the menu bar, if you have it turned on, shows the
> basic slime repl commands including previous-input in the "REPL" menu,
> and at least on typical systems, would show the M-p shortcut beside it.
> (Menus are often used by users for "command discovery" these days in
> desktop applications.  While menus are pretty much unworkable for a
> system with the amount of commands emacs actually has, emacs mode
> authors tend to be careful to include a few of the basic commands in a
> mode-specific menu these days, so it can be worth turning the menu-bar
> on if you find C-h b (or just (gasp) reading a mode's
...

Just my 2c. - hitting Ctrl-Mouse-button-3 brings up the menu on my box
(it seems it's bound to 'mouse-popup-menubar-stuff), so you don't have
to go as far as switching the thing on and off.

Rupert
From: Thomas A. Russ
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <ymifxrjsy36.fsf@blackcat.isi.edu>
·······@gmail.com" <······@gmail.com> writes:

> On Jun 11, 12:15 pm, ·············@gmail.com wrote:
> > I am tired of copying and pasting the commands i have written just
> > before. Is there any shortcut key to print the last command in SLIME;
> > such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.
> 
> Alt-p

Not to mention

 (eval +)
 (eval ++)
 (eval +++)

which will work in any REPL, not just slime.  Of course, you often want
to edit the previous lines, in which case slime or something like it is
much nicer.


-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Pascal J. Bourguignon
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <87ej738zlm.fsf@hubble.informatimago.com>
···@sevak.isi.edu (Thomas A. Russ) writes:

> ·······@gmail.com" <······@gmail.com> writes:
>
>> On Jun 11, 12:15 pm, ·············@gmail.com wrote:
>> > I am tired of copying and pasting the commands i have written just
>> > before. Is there any shortcut key to print the last command in SLIME;
>> > such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.
>> 
>> Alt-p
>
> Not to mention
>
>  (eval +)
>  (eval ++)
>  (eval +++)
>
> which will work in any REPL, not just slime.  Of course, you often want
> to edit the previous lines, in which case slime or something like it is
> much nicer.

Too bad we can't write (ed +), it expects a function or a file...

(defun ee (form)
  (eval 
    (print
      (let ((path (merge-pathnames "tempform.lisp" (user-homedir-pathname))))
        (with-open-file (out path :direction :output) (print form out))
        #+clisp (ext:run-program "emacsclient" :arguments (list (namestring path)))
        #-clisp (error "Not implemented yet.")
        (with-open-file (inp path :direction :input) (read inp))))))



C/USER[22]> (+ 1 2 3 4)
10
C/USER[23]> (ee +)
Waiting for Emacs...

(* 1 2 3 4) 
24
C/USER[24]> 


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
From: Maciej Katafiasz
Subject: Re: How to reprint the last command line
Date: 
Message-ID: <g2sajr$tod$1@news.net.uni-c.dk>
Den Wed, 11 Jun 2008 03:31:20 -0700 skrev ······@gmail.com:

> On Jun 11, 12:15 pm, ·············@gmail.com wrote:
>> I am tired of copying and pasting the commands i have written just
>> before. Is there any shortcut key to print the last command in SLIME;
>> such as F3 in DOS or "UP" key in PROLOG? Thanks in advance.
> 
> Alt-p

Or C-up, which plays along much better with my fingers.

Cheers,
Maciej