GNU bug report logs - #11017
24.0.94; emacs-lock--kill-emacs-query-functions should ding

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Thu, 15 Mar 2012 05:14:01 UTC

Severity: wishlist

Found in versions 24.2, 24.0.94

Full log


View this message in rfc822 format

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 11017 <at> debbugs.gnu.org
Subject: bug#11017: 24.0.94; emacs-lock--kill-emacs-query-functions should ding
Date: Thu, 15 Mar 2012 13:54:12 +0100
On Thu, Mar 15, 2012 at 05:48, Michael Heerdegen
<michael_heerdegen <at> web.de> wrote:

> if I lock a buffer and try to exit Emacs, I only get a message:
>
>  "Buffer %S is locked and cannot be killed"

Really? I get "Emacs cannot exit because buffer %S is locked".

> This is IMHO not enough.  If the user tries to exit Emacs while there
> are locked buffers, he obviously has forgotten about these locks. So,
> there should be a (ding) to attract the user's attention.

A ding is obnoxious to many people. It could be added as an option,
but it is not really necessary IMHO. You can use

(defadvice emacs-lock--kill-emacs-query-functions (around do-ding activate)
  ad-do-it
  (unless ad-return-value (ding)))

(defadvice emacs-lock--kill-emacs-hook (around do-ding activate)
  (condition-case err
      ad-do-it
    (error
     (ding)
     (signal (car err) (cdr err)))))

> Without this, the user will possibly continue saying "yes" to the
> expected questions Emacs typically asks, and accidentally modify some
> buffer, which is annoying.

Getting into the habit of typing without reading what Emac is saying
is dangerous because you can end typing Y to a question you would've
rather said N...

    Juanma




This bug report was last modified 3 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.