GNU bug report logs - #55560
29.0.50; kill-emacs on daemon doesn't remove ~/.emacs.d/.emacs.desktop.lock

Previous Next

Package: emacs;

Reported by: Peter Ludemann <peter.ludemann <at> gmail.com>

Date: Sat, 21 May 2022 19:18:01 UTC

Severity: normal

Tags: moreinfo

Merged with 55574

Found in versions 28.1, 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 55560 <at> debbugs.gnu.org (full text, mbox):

From: Peter Ludemann <peter.ludemann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55560 <at> debbugs.gnu.org
Subject: Re: bug#55560: 29.0.50;
 kill-emacs on daemon doesn't remove ~/.emacs.d/.emacs.desktop.lock
Date: Sat, 21 May 2022 13:43:42 -0700
[Message part 1 (text/plain, inline)]
The various wikis are somewhat out of date. For example, this shows how to
create custom functions that do what save-buffers-kill-emacs does:
https://www.emacswiki.org/emacs/EmacsAsDaemon

Also, the documentation for kill-buffers and save-buffers-kill-emacs makes
no mention of the lock file.

Anyway, when I do "emacs --daemon -Q", "emacsclient -e
'save-buffers-kill-emacs'" worked fine; but when I run the daemon without
the "-Q", the "emacs -e 'save-buffers-kill-emacs'" command just sits there
with no output. The problem seems to be that I have this in my .emacs:

(setq kill-emacs-query-functions
     (cons (lambda () (yes-or-no-p "Really kill Emacs? "))
           kill-emacs-query-functions))

which sets kill-emacs-query-functions to:
((lambda nil
   (yes-or-no-p "Really kill Emacs? "))
 desktop-kill)

[I don't know where the "desktop-kill" comes from]

I often accidentally do ^X-^C when I run emacs in non-daemon mode, so I'd
like to keep this hook, or something similar. Is there a better way of
getting an "are you sure" message that works with both daemon and
non-daemon?
[Message part 2 (text/html, inline)]

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

Previous Next


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