From: ·············@gmail.com
Subject: Exit SLIME
Date: 
Message-ID: <1182526506.630943.278800@c77g2000hse.googlegroups.com>
Hi everyone,

I'm learning Lisp, using SLIME and Emacs. Everytime I close Emacs it
informs me of a running process and asks me if I want to kill that
process. I choose Yes to quit Emacs. Is it the right way to quit any
active process running under Emacs (such as Slime, gdb...), or is
there any key-combination that I can use?

Thanks.

Mark.

From: Tamas Papp
Subject: Re: Exit SLIME
Date: 
Message-ID: <87ps3o6kqh.fsf@pu100877.student.princeton.edu>
·············@gmail.com writes:

> Hi everyone,
>
> I'm learning Lisp, using SLIME and Emacs. Everytime I close Emacs it
> informs me of a running process and asks me if I want to kill that
> process. I choose Yes to quit Emacs. Is it the right way to quit any
> active process running under Emacs (such as Slime, gdb...), or is
> there any key-combination that I can use?

Hi Mark,

, (comma) then type "quit" and enter

Tamas
From: Ari Johnson
Subject: Re: Exit SLIME
Date: 
Message-ID: <m2k5twvt6y.fsf@hermes.theari.com>
Tamas Papp <······@gmail.com> writes:

> ·············@gmail.com writes:
>
>> Hi everyone,
>>
>> I'm learning Lisp, using SLIME and Emacs. Everytime I close Emacs it
>> informs me of a running process and asks me if I want to kill that
>> process. I choose Yes to quit Emacs. Is it the right way to quit any
>> active process running under Emacs (such as Slime, gdb...), or is
>> there any key-combination that I can use?
>
> Hi Mark,
>
> , (comma) then type "quit" and enter

You can also bind slime-quit-lisp to a key.  I actually have the
following, which accounts for when I'm connected to a remote lisp
(which I wouldn't want to kill).  Note that I have my Mac's command
key mapped to Hyper (that way, control = control and option/alt = meta
whether I'm in a GUI-bound Emacs or in a terminal connected to a
remote Emacs via ssh) and use it for convenience things, such as H-s l
to bring up a local slime, H-g for gnus, H-r to reload .emacs, and so
forth.  H-q is mapped, where sensible, to quit the current
application.

(defun slime-smart-quit ()
  (interactive)
  (when (slime-connected-p)
    (if (equal (slime-machine-instance) "my.workstation")
      (slime-quit-lisp)
      (slime-disconnect)))
  (slime-kill-all-buffers))

(define-key slime-repl-mode-map [(hyper q)] 'slime-smart-quit)
From: ·············@gmail.com
Subject: Re: Exit SLIME
Date: 
Message-ID: <1182531679.035461.252550@n60g2000hse.googlegroups.com>
On Jun 22, 10:40 am, Ari Johnson <·········@gmail.com> wrote:
> Tamas Papp <······@gmail.com> writes:
> > ·············@gmail.com writes:
>
> >> Hi everyone,
>
> >> I'm learning Lisp, using SLIME and Emacs. Everytime I close Emacs it
> >> informs me of a running process and asks me if I want to kill that
> >> process. I choose Yes to quit Emacs. Is it the right way to quit any
> >> active process running under Emacs (such as Slime, gdb...), or is
> >> there any key-combination that I can use?
>
> > Hi Mark,
>
> > , (comma) then type "quit" and enter
>
> You can also bind slime-quit-lisp to a key.  I actually have the
> following, which accounts for when I'm connected to a remote lisp
> (which I wouldn't want to kill).  Note that I have my Mac's command
> key mapped to Hyper (that way, control = control and option/alt = meta
> whether I'm in a GUI-bound Emacs or in a terminal connected to a
> remote Emacs via ssh) and use it for convenience things, such as H-s l
> to bring up a local slime, H-g for gnus, H-r to reload .emacs, and so
> forth.  H-q is mapped, where sensible, to quit the current
> application.
>
> (defun slime-smart-quit ()
>   (interactive)
>   (when (slime-connected-p)
>     (if (equal (slime-machine-instance) "my.workstation")
>       (slime-quit-lisp)
>       (slime-disconnect)))
>   (slime-kill-all-buffers))
>
> (define-key slime-repl-mode-map [(hyper q)] 'slime-smart-quit)

Thanks. These are very helpful.

Mark.
From: Pascal Bourguignon
Subject: Re: Exit SLIME
Date: 
Message-ID: <87k5tvkdcm.fsf@thalassa.lan.informatimago.com>
·············@gmail.com writes:

> On Jun 22, 10:40 am, Ari Johnson <·········@gmail.com> wrote:
>> Tamas Papp <······@gmail.com> writes:
>> > ·············@gmail.com writes:
>>
>> >> Hi everyone,
>>
>> >> I'm learning Lisp, using SLIME and Emacs. Everytime I close Emacs it
>> >> informs me of a running process and asks me if I want to kill that
>> >> process. I choose Yes to quit Emacs. Is it the right way to quit any
>> >> active process running under Emacs (such as Slime, gdb...), or is
>> >> there any key-combination that I can use?
>>
>> > Hi Mark,
>>
>> > , (comma) then type "quit" and enter
>>
>> You can also bind slime-quit-lisp to a key.  I actually have the
>> following, which accounts for when I'm connected to a remote lisp
>> (which I wouldn't want to kill).  Note that I have my Mac's command
>> key mapped to Hyper (that way, control = control and option/alt = meta
>> whether I'm in a GUI-bound Emacs or in a terminal connected to a
>> remote Emacs via ssh) and use it for convenience things, such as H-s l
>> to bring up a local slime, H-g for gnus, H-r to reload .emacs, and so
>> forth.  H-q is mapped, where sensible, to quit the current
>> application.
>>
>> (defun slime-smart-quit ()
>>   (interactive)
>>   (when (slime-connected-p)
>>     (if (equal (slime-machine-instance) "my.workstation")
>>       (slime-quit-lisp)
>>       (slime-disconnect)))
>>   (slime-kill-all-buffers))
>>
>> (define-key slime-repl-mode-map [(hyper q)] 'slime-smart-quit)
>
> Thanks. These are very helpful.

Also, in emacs there are a lot of hooks. For example you could put
slime-smart-quit on the kill-emacs-hook so it's called automatically
when you quit emacs (which is called kill-emacs, hence the name of the
hook).

Put:

   (add-hook 'kill-emacs-hook 'slime-smart-quit)

in ~/.emacs and then C-x C-c will quit slime automatically.

-- 
__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.