help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: starting the emacs daemon using init.org?


From: Marcin Borkowski
Subject: Re: starting the emacs daemon using init.org?
Date: Mon, 20 Jul 2015 15:40:11 +0200

On 2015-07-20, at 14:42, Barry Fishman <barry_fishman@acm.org> wrote:

> I can't remember the last time Emacs crashed on me.  I do tend to have

It happens.  I remember mu4e hanged for me two times (though it was
probably not mu4e's fault, I suspect some HTML rendering issue).

> issues with mistyping so I have disabled my most common reasons for my
> Emacs to disappear.  First I never need to background Emacs from the
> keyboard:
>
> ;;; Re-establish C-z prefix
> (defvar my-control-map (make-sparse-keymap))
> (define-key global-map [(control z)] my-control-map)
>
> With gives me another key to put my own bindings.  I then make sure

Ha, that's exactly what I do, too!

> any C-x C-c isn't an accident:
>
> ;;; Require confirmation and rebind C-x C-c appropriately
> (defun my-exit-from-emacs ()
>   (interactive)
>   (if (yes-or-no-p "Do you want to exit ")
>       (save-buffers-kill-terminal)))
> (define-key global-map [(control x) (control c)] 'my-exit-from-emacs)

As an aside: why not just (setq confirm-kill-emacs #'yes-or-no-p)?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]