From: Martin on
Hi all,

I've just started my journey through the land of lisp (clisp) on
Slackware64-current using Emacs + slime. I've got a few basic questions
regarding setting up working environment. The emacs slime-mode starts
without any errors but the key bindings seems not to work.
This is my .emacs file
> ;; Lisp
> (setq inferior-lisp-program "clisp")
> (add-to-list 'load-path "/home/xtd8865/.emacs.d/slime/")
> (require 'slime-autoloads)
> (slime-setup '(slime-fancy))

When I want to close paranthesis (C-c C-q) nothing happens. Other
shortcuts mentioned in tutorials don't work either.

The slime.el file is quite long and I haven't edited it yet.
Am I supposed to modify it? I thought all the basic key bindings
would be automatically set when loading slime.

I'd appreciate any help on it.
Thank you
--
regards

Martin
From: Tamas K Papp on
On Sat, 23 Jan 2010 11:11:00 +0000, Martin wrote:

> Hi all,
>
> I've just started my journey through the land of lisp (clisp) on
> Slackware64-current using Emacs + slime. I've got a few basic questions
> regarding setting up working environment. The emacs slime-mode starts
> without any errors but the key bindings seems not to work. This is my
> .emacs file
>> ;; Lisp
>> (setq inferior-lisp-program "clisp")
>> (add-to-list 'load-path "/home/xtd8865/.emacs.d/slime/") (require
>> 'slime-autoloads)
>> (slime-setup '(slime-fancy))
> When I want to close paranthesis (C-c C-q) nothing happens. Other
> shortcuts mentioned in tutorials don't work either.

What do you mean "nothing happens"? Do you get a "C-c C-q is
undefined" message? This key is not bound in my slime setup, what is
it supposed to do? BTW, paredit is quite nice for S-expression
manipulations.

> The slime.el file is quite long and I haven't edited it yet. Am I
> supposed to modify it? I thought all the basic key bindings would be
> automatically set when loading slime.

No, you are certainly not required to edit that. Are you using the
CVS version of SLIME? (you should, some distros package that with a
lag).

And you have to start the REPL by M-x slime. If you do that, does C-c
C-z take you to the REPL from a source file? If so, SLIME should be
working just fine. See C-h m (or the countless tutorials on the net)
for key mappings. Tobias C. Rittweiler has some slides on SLIME here:
http://common-lisp.net/~trittweiler/talks/

Tamas



From: Martin on
On 01/23/2010 11:21 AM, Tamas K Papp wrote:
> On Sat, 23 Jan 2010 11:11:00 +0000, Martin wrote:
>
>> Hi all,
>>
>> I've just started my journey through the land of lisp (clisp) on
>> Slackware64-current using Emacs + slime. I've got a few basic questions
>> regarding setting up working environment. The emacs slime-mode starts
>> without any errors but the key bindings seems not to work. This is my
>> .emacs file
>>> ;; Lisp
>>> (setq inferior-lisp-program "clisp")
>>> (add-to-list 'load-path "/home/xtd8865/.emacs.d/slime/") (require
>>> 'slime-autoloads)
>>> (slime-setup '(slime-fancy))
>> When I want to close paranthesis (C-c C-q) nothing happens. Other
>> shortcuts mentioned in tutorials don't work either.
>
> What do you mean "nothing happens"? Do you get a "C-c C-q is
> undefined" message? This key is not bound in my slime setup, what is
> it supposed to do? BTW, paredit is quite nice for S-expression
> manipulations.
>
>> The slime.el file is quite long and I haven't edited it yet. Am I
>> supposed to modify it? I thought all the basic key bindings would be
>> automatically set when loading slime.
>
> No, you are certainly not required to edit that. Are you using the
> CVS version of SLIME? (you should, some distros package that with a
> lag).
>
> And you have to start the REPL by M-x slime. If you do that, does C-c
> C-z take you to the REPL from a source file? If so, SLIME should be
> working just fine. See C-h m (or the countless tutorials on the net)
> for key mappings. Tobias C. Rittweiler has some slides on SLIME here:
> http://common-lisp.net/~trittweiler/talks/
>
> Tamas
>
>
>

Thanks for your reply.

I'm using a CVS version of slime as instructed on their website. When I
start emacs I do M-x slime and it goes straight to REPL. Yes, when I
edit as source file and press C-c C-z it goes to REPL, so I guess
everything is fine. C-c C-q is supposed to insert any required
parantheses, as per the following tutorial (practical common lisp) :
http://www.gigamonkeys.com/book/lather-rinse-repeat-a-tour-of-the-repl.html
(quotation below)

> SLIME will also help match up the parentheses--as you type a closing parenthesis,

it will flash the corresponding opening parenthesis.

Or you can just type C-c C-q to invoke the command
slime-close-parens-at-point,

which will insert as many closing parentheses as necessary to match all
the currently

open parentheses.
>

Thanks for the link I'm going read the files now.

--
regards

Martin
From: Tamas K Papp on
On Sat, 23 Jan 2010 12:31:02 +0000, Martin wrote:

> everything is fine. C-c C-q is supposed to insert any required
> parantheses, as per the following tutorial (practical common lisp) :
> http://www.gigamonkeys.com/book/lather-rinse-repeat-a-tour-of-the-repl.html
> (quotation below)
>
>> SLIME will also help match up the parentheses--as you type a closing
>> parenthesis,
>
> it will flash the corresponding opening parenthesis.
> Or you can just type C-c C-q to invoke the command
> slime-close-parens-at-point, which will insert as many closing
> parentheses as necessary to match all the currently open
> parentheses.

PCL is certainly an excellent book, but SLIME underwent a lot of
development since PCL has been written, so particular keymappings may
not work any more, and SLIME has acquired tons of new features.

You might be looking for

C-c C-] slime-close-all-parens-in-sexp

Happy lisping,

Tamas
From: Martin on
On 01/23/2010 12:46 PM, Tamas K Papp wrote:
> On Sat, 23 Jan 2010 12:31:02 +0000, Martin wrote:
>
>> everything is fine. C-c C-q is supposed to insert any required
>> parantheses, as per the following tutorial (practical common lisp) :
>> http://www.gigamonkeys.com/book/lather-rinse-repeat-a-tour-of-the-repl.html
>> (quotation below)
>>
>>> SLIME will also help match up the parentheses--as you type a closing
>>> parenthesis,
>>
>> it will flash the corresponding opening parenthesis.
>> Or you can just type C-c C-q to invoke the command
>> slime-close-parens-at-point, which will insert as many closing
>> parentheses as necessary to match all the currently open
>> parentheses.
>
> PCL is certainly an excellent book, but SLIME underwent a lot of
> development since PCL has been written, so particular keymappings may
> not work any more, and SLIME has acquired tons of new features.
>
> You might be looking for
>
> C-c C-] slime-close-all-parens-in-sexp
>
> Happy lisping,
>
> Tamas

Thanks for your reply. Unfortunately C-c C-] is undefined as well. I did
it in REPL. I'll do more googling on it.
I also downloaded a slime manual from their website so I'll have
a look at it.
I've got one more question: when I finish working with lisp and emacs
do I normally exit emacs C-x C-s C-x C-c or do I need to close
lisp/slime manually?

--
regards

Martin