Re: Exit SLIME



case.learning@xxxxxxxxx writes:

On Jun 22, 10:40 am, Ari Johnson <iamthe...@xxxxxxxxx> wrote:
Tamas Papp <tkp...@xxxxxxxxx> writes:
case.learn...@xxxxxxxxx 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.
.



Relevant Pages

  • Re: What text editor is everyone using for Python
    ... hit CTRL/G and see if the word "Quit" appears somewhere. ... Ctrl-G is the emacs interrupt sequence. ... If you run emacs in a windowing environment (eg X-Windows or Windows) ... The interactive features of emacs are really useful for testing python ...
    (comp.lang.python)
  • Re: What programming language to learn for OS X
    ... each occasion it took 20 mins to figure out how to quit it. ... two minutes to understand how to use it for 99% of my editing tasks - ... numpty mode without any magic spells and save with a cmd-S ... The scary thing is that emacs is making its way into normal things. ...
    (uk.comp.sys.mac)
  • Re: Exit SLIME
    ... I'm learning Lisp, using SLIME and Emacs. ... informs me of a running process and asks me if I want to kill that ... I choose Yes to quit Emacs. ...
    (comp.lang.lisp)
  • Re: What programming language to learn for OS X
    ... each occasion it took 20 mins to figure out how to quit it. ... Obviously I know Tim is joking, but when you start emacs, the ... TECO, my son, TECO. ...
    (uk.comp.sys.mac)
  • Re: Exit SLIME
    ... informs me of a running process and asks me if I want to kill that ... I choose Yes to quit Emacs. ... (which I wouldn't want to kill). ...
    (comp.lang.lisp)