Subject: 24.4; desktop-kill, which is interactive, is in kill-emacs-hook

From: Michael Arntzenius <[email-masked]>
Date: Wed, 4 Nov 2015 22:43:17 +0000

Recipe:

emacs -Q
M-x desktop-save-mode
C-h v kill-emacs-hook
M-x kill-emacs

Expected behavior: emacs is killed.
Actual behavior: asked "Save desktop? (y or n)"

The same behavior occurs if I send emacs SIGTERM. In particular, this
behavior occurs if an `emacs --daemon' instance with no running clients
is sent SIGTERM, which results in it... not quitting. Sending SIGTERM
twice kills it, but this is very idiosyncratic behavior.

In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.9)
 of 2015-03-21 on kissel, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11701000
System Description:    Ubuntu 15.04

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  paredit-mode: t
  rainbow-delimiters-mode: t
  whitespace-mode: t
  which-function-mode: t
  iswitchb-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
M-x r e p o r t e - <backspace> <backspace> - e m <tab>
<return> C-g M-x s u m m <tab> C-g M-x r e p o r t
- e m <tab> <return> d e s k t o p SPC <backspace>
M-b k i l l - C-g C-h f d e s k t o p - k i l l <return>
C-h v d <backspace> k i l l - e m <tab> h o <tab> <return>
C-' C-n C-n C-e C-a C-e C-M-' C-; r j e C-; C-f . e
m <tab> / i n i <tab> <return> C-a C-s C-g C-; r s
e C-e C-p C-n C-s ? e C-a C-; r j e C-e C-; e C-; C-g
C-a C-e C-; C-e C-; r j e C-a C-e C-r s e t - r e g
i s t C-e C-; r i p C-/ C-a C-e C-; C-s M-x r e p o
r t - e m <tab> <return>

Recent messages:
 '(desktop-load-locked-desktop t)"
Mark saved where search started
jump-to-register: Register doesn't contain a buffer position or
configuration
kmacro-call-macro: No kbd macro has been defined
C-x C-g is undefined
(file . "~/.emacs.d/init.el")
Mark saved where search started
Mark set
Undo!
(No changes need to be saved)

Load-path shadows:
/home/rntz/.emacs.d/elpa/haml-mode-20141213.920/haml-mode hides
~/.emacs.d/elisp/haml-mode
/home/rntz/.emacs.d/elpa/sass-mode-20141219.324/sass-mode hides
~/.emacs.d/elisp/sass-mode
/home/rntz/.emacs.d/elpa/yaml-mode-20141125.37/yaml-mode hides
~/.emacs.d/elisp/yaml-mode
/home/rntz/.emacs.d/elpa/markdown-mode-20150121.1229/markdown-mode hides
~/.emacs.d/elisp/markdown-mode
/home/rntz/.emacs.d/elpa/paredit-20150217.713/paredit hides
~/.emacs.d/elisp/paredit
/usr/share/emacs/24.4/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
~/.emacs.d/elisp/loaddefs hides /usr/share/emacs/24.4/lisp/loaddefs
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/24.4/lisp/textmodes/flyspell
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/24.4/lisp/textmodes/ispell
/home/rntz/.emacs.d/elpa/prolog-1.22/prolog hides
/usr/share/emacs/24.4/lisp/progmodes/prolog

Features:
(shadow sort mail-extr misearch multi-isearch eieio-opt emacsbug message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail-utils add-log server sml-mode julia-mode ert debug sgml-mode
tex-mode rst sass-mode haml-mode js css-mode ruby-mode simple-tabs
elm-mode elm-map elm-preview elm-compile elm-repl elm-util elm-font-lock
elm-indentation elm-indent elm-string js3-mode js3-parse js3-browse
js3-highlight js3-ast js3-messages js3-scan js3-util js3-vars
js3-externs python json cider-mode cider-eldoc eldoc cider-interaction
cider-doc org-table cider-test cider-stacktrace cider-client
nrepl-client queue cider-util ewoc clojure-mode conf-mode markdown-mode
slime arc-mode archive-mode hyperspec agda2-mode derived agda2-queue
agda2-abbrevs skeleton agda2-highlight agda2 agda-input quail help-mode
annotation eri pp rust-mode cc-langs cc-mode cc-fonts cc-guess cc-menus
cc-cmds lua-mode rx make-mode utop utop-minor-mode caml tuareg_indent
tuareg speedbar sb-image ezimage dframe caml-help caml-types caml-emacs
scheme racket-mode racket-collection tq ido racket-profile racket-edit
hideshow racket-complete racket-repl racket-util racket-common
racket-indent racket-font-lock racket-keywords-and-builtins thingatpt
racket-custom dash haskell-indent superword subword haskell-font-lock
inf-haskell haskell-cabal haskell-utils haskell-decl-scan haskell-mode
haskell-string haskell-sort-imports haskell-align-imports haskell-compat
haskell-complete-module flymake etags compile dabbrev haskell-customize
vc-git org-element org-rmail org-mhe org-irc org-info org-gnus
org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb
org-w3m org org-macro org-footnote org-pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu
calendar cal-loaddefs dired-aux sh-script smie executable tramp-cache
tramp-sh tramp tramp-compat auth-source eieio eieio-core gnus-util
mm-util mail-prsvr password-cache tramp-loaddefs trampver shell
pcomplete comint ring format-spec buffer-rename-relative paredit
rainbow-delimiters whitespace which-func imenu paren time-date iswitchb
icomplete hl-line desktop frameset cus-start cus-load ansi-color cstuff
cc-styles cc-align cc-engine cc-vars cc-defs browse-url dired-details+
dired-details dired-x wdired dired dired-sort-map ls-lisp byte-opt
bytecomp byte-compile cconv mode-line-host-name advice autoload help-fns
lisp-mnt ctags-autoloads dot-mode-autoloads edmacro kmacro
js3-mode-autoloads git-commit-mode-autoloads pkg-info-autoloads
epl-autoloads prolog-autoloads queue-autoloads s-autoloads info easymenu
slime-autoloads stupid-indent-mode-autoloads cl-macs package epg-config
proof-site proof-autoloads pg-vars mmm-auto mmm-vars mmm-compat cl gv
cl-loaddefs cl-lib tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 685833 56003)
  (symbols 48 53292 0)
  (miscs 40 13732 2490)
  (strings 32 149124 24011)
  (string-bytes 1 4249422)
  (vectors 16 64105)
  (vector-slots 8 2219937 150055)
  (floats 8 262 561)
  (intervals 56 25805 0)
  (buffers 960 440)
  (heap 1024 83840 2089))