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.
·············@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
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)
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.
·············@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.