From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 15:17:35 2022 Received: (at submit) by debbugs.gnu.org; 21 May 2022 19:17:35 +0000 Received: from localhost ([127.0.0.1]:42981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsUbW-0002qs-Fp for submit@debbugs.gnu.org; Sat, 21 May 2022 15:17:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:52244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsUbV-0002ql-BM for submit@debbugs.gnu.org; Sat, 21 May 2022 15:17:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsUbV-0004wn-2Q for bug-gnu-emacs@gnu.org; Sat, 21 May 2022 15:17:33 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:43806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsUbT-0004gQ-0y for bug-gnu-emacs@gnu.org; Sat, 21 May 2022 15:17:32 -0400 Received: by mail-pg1-x534.google.com with SMTP id q76so10378474pgq.10 for ; Sat, 21 May 2022 12:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=C4ihxzyYW19TQWJKYDlGoXLf3UFwy8uI2w3gaJGGw4I=; b=p6irsFjjRO+lg1CROkKxoSqHIGmYx4sn7+PfP8tMbyI7mQt3lIZNNkpAlgwJku7BLo a1ydwNdLfM5FCz3mO6WnUrH2CV1gRGukFI1c5D9+4jqkPsbTDXaAu/9T6erXdnL9Q7wq acjMHgk0hQm+wu/mB6q7p4Pap+J11ZoMs18RbzrOfUDXxZqKdfDF+c0mdAMgYzNlLi2E kXIAfVR5/DyHW2pOymAcghZcO+9e1V+GEipu2OcnAvvVusUHJS2crwKQ/aSg5PrnPe7J i53oOVYgkZp086nnKr0kYULHHxW2IlgzeTo++PlJjCaHKmFU5dKf4x60J0BQgKzRAFRh Yt3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=C4ihxzyYW19TQWJKYDlGoXLf3UFwy8uI2w3gaJGGw4I=; b=rL2818kJTJA0tBcIsI33OaWfgbrI7JZVHE6s2f6El6SGX60cR8Zqn693gIzV6H/ZDy MDWst+1cpiAT9Beg9fyXrwA6J1vZll55GAGpKv2vENEhmfpO9jMWZ2ftmI/zhLwET9H0 J4Eketk6jVQHqv98ga3ADiGMx4kBjqVrYPc7tbz1SFl7vo/Tw0E4FCX3DjdlogI8lw5E ViZb1k3RTL9Rs8YPOyvHeSuERq4CNU2d+Srsj0gmfO6RVeQWootVv9lfvJ22bDr2UUFe +tIeA9Dlpd/DzgPSs68nvAc7gphIO4wamslG4pPi6TIJMM0jI7gzcVusDTgOnom2hkSn 9d8Q== X-Gm-Message-State: AOAM5328hdFS5YyvrFlAFIMjRly3VRohPKVf7TEBarTqe/pUyzaR1tve qlhGbvH8tkaLqlr5lKejPdvV2WhM6yfO8yWAbDaKMvX8 X-Google-Smtp-Source: ABdhPJw1stfGlLiHirlEFmY+cfOM2cIpji9UkFbdpZ25JNAvAOai9DntgYyeaewmIj7zk3uEnVOB6WUA+tNcb1t3swI= X-Received: by 2002:a63:1953:0:b0:3c6:e5e:9190 with SMTP id 19-20020a631953000000b003c60e5e9190mr13573363pgz.286.1653160648518; Sat, 21 May 2022 12:17:28 -0700 (PDT) MIME-Version: 1.0 From: Peter Ludemann Date: Sat, 21 May 2022 12:16:50 -0700 Message-ID: Subject: 29.0.50; kill-emacs on daemon doesn't remove ~/.emacs.d/.emacs.desktop.lock To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="00000000000036312a05df8a75d2" Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=peter.ludemann@gmail.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000036312a05df8a75d2 Content-Type: text/plain; charset="UTF-8" I started emacs with "emacs --daemon". I stopped it with the "kill-emacs" command. Emacs stopped, but the desktop lock file remained. Following is the my console (not showing the "emacs --daemon" command). I'm pretty sure that older emacsen deleted the lock file when the daemon was stopped, so this looks like a regression. If it makes a difference, there was an existing .emacs.desktop file when I started the daemon. $ ps auwwwxxx|grep emacs peter 29376 4.1 0.4 135876 68624 ? Ss 11:30 0:05 emacs --daemon peter 29855 0.0 0.0 6180 728 pts/0 S+ 11:33 0:00 grep emacs $ cat ~/.emacs.d/.emacs.desktop.lock ;echo 29376 $ emacsclient -e '(kill-emacs)' $ ps auwwwxxx|grep emacs peter 29861 0.0 0.0 6180 664 pts/0 S+ 11:33 0:00 grep emacs $ cat ~/.emacs.d/.emacs.desktop.lock ;echo 29376 In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2022-05-21 built on penguin Repository revision: 208102fa470e3417320062cdb48a9967d80bf092 Repository branch: master System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --prefix=/home/peter/.local --with-gnutls PKG_CONFIG_PATH=/home/peter/.local/lib/pkgconfig:' Configured features: FREETYPE GIF GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XFT XIM XPM LUCID ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Apropos Minor modes in effect: global-auto-revert-mode: t display-time-mode: t savehist-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: ~/src/pykythe/emacs/prolog hides /home/peter/.local/share/emacs/29.0.50/lisp/progmodes/prolog Features: (shadow sort mail-extr emacsbug message yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shortdoc help-fns radix-tree misearch multi-isearch mule-util apropos time-date term/xterm xterm finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars cl-extra help-mode seq gv subr-x byte-opt bytecomp byte-compile cconv autorevert filenotify grep compile text-property-search comint ansi-color ring cus-load time savehist desktop frameset cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads inotify dynamic-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 91186 8875) (symbols 48 9960 1) (strings 32 29163 1620) (string-bytes 1 904097) (vectors 16 15493) (vector-slots 8 175522 6636) (floats 8 79 477) (intervals 56 533 0) (buffers 992 12)) --00000000000036312a05df8a75d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I started emacs with "emacs --daemon". I stopped it w= ith the
"kill-emacs" command. Emacs stopped, but the desktop l= ock file
remained. Following is the my console (not showing the
"= ;emacs --daemon" command).

I'm pretty sure that older emacs= en deleted the lock file=C2=A0
when the daemon was stopped, so this looks l= ike a=C2=A0
regression. If it makes a difference, there was an=C2=A0
<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">existi= ng .emacs.desktop file when I started the daemon.

$ ps auwwwxxx|grep em= acs
peter =C2=A0 =C2=A029376 =C2=A04.1 =C2=A00.4 135876 68624 ? =C2=A0 = =C2=A0 =C2=A0 =C2=A0Ss =C2=A0 11:30 =C2=A0 0:05 emacs --daemon
peter =C2= =A0 =C2=A029855 =C2=A00.0 =C2=A00.0 =C2=A0 6180 =C2=A0 728 pts/0 =C2=A0 =C2= =A0S+ =C2=A0 11:33 =C2=A0 0:00 grep emacs
$ cat ~/.emacs.d/.emacs.deskto= p.lock ;echo
29376
$ emacsclient -e '(kill-emacs)'
$ ps au= wwwxxx|grep emacs
peter =C2=A0 =C2=A029861 =C2=A00.0 =C2=A00.0 =C2=A0 61= 80 =C2=A0 664 pts/0 =C2=A0 =C2=A0S+ =C2=A0 11:33 =C2=A0 0:00 grep emacs
= $ cat ~/.emacs.d/.emacs.desktop.lock ;echo
29376


In GNU Emacs= 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
= =C2=A0of 2022-05-21 built on penguin
Repository revision: 208102fa470e34= 17320062cdb48a9967d80bf092
Repository branch: master
System Descripti= on: Debian GNU/Linux 11 (bullseye)

Configured using:
=C2=A0'c= onfigure --prefix=3D/home/peter/.local --with-gnutls
=C2=A0PKG_CONFIG_PA= TH=3D/home/peter/.local/lib/pkgconfig:'

Configured features:
= FREETYPE GIF GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG
= SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE
XF= T XIM XPM LUCID ZLIB

Important settings:
=C2=A0 value of $LANG: e= n_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major mode: Ap= ropos

Minor modes in effect:
=C2=A0 global-auto-revert-mode: t=C2=A0 display-time-mode: t
=C2=A0 savehist-mode: t
=C2=A0 desktop-s= ave-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2= =A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wh= eel-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 buf= fer-read-only: t
=C2=A0 column-number-mode: t
=C2=A0 line-number-mode= : t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-composition-mode: t
= =C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t

Lo= ad-path shadows:
~/src/pykythe/emacs/prolog hides /home/peter/.local/sha= re/emacs/29.0.50/lisp/progmodes/prolog

Features:
(shadow sort mai= l-extr emacsbug message yank-media rmc puny dired
dired-loaddefs rfc822 = mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bo= dies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendma= il rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils shortdoc hel= p-fns radix-tree misearch
multi-isearch mule-util apropos time-date term= /xterm xterm finder-inf
package browse-url url url-proxy url-privacy url= -expand url-methods
url-history url-cookie url-domsuf url-util mailcap u= rl-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-= loaddefs
password-cache json map url-vars cl-extra help-mode seq gv subr= -x
byte-opt bytecomp byte-compile cconv autorevert filenotify grep compi= le
text-property-search comint ansi-color ring cus-load time savehistdesktop frameset cl-loaddefs cl-lib iso-transl tooltip eldoc paren
elec= tric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term= /x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt= fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode = register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select= scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors fr= ame minibuffer nadvice simple cl-generic cham georgian
utf-8-lang misc-l= ang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp5193= 2 hebrew greek romanian slovak czech european
ethiopic indian cyrillic c= hinese composite emoji-zwj charscript charprop
case-table epa-hook jka-c= mpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces= cus-face macroexp files window
text-properties overlay sha1 md5 base64 = format env code-pages mule
custom widget keymap hashtable-print-readable= backquote threads inotify
dynamic-setting font-render-setting x-toolkit= x multi-tty
make-network-process emacs)

Memory information:
(= (conses 16 91186 8875)
=C2=A0(symbols 48 9960 1)
=C2=A0(strings 32 29= 163 1620)
=C2=A0(string-bytes 1 904097)
=C2=A0(vectors 16 15493)
= =C2=A0(vector-slots 8 175522 6636)
=C2=A0(floats 8 79 477)
=C2=A0(int= ervals 56 533 0)
=C2=A0(buffers 992 12))
--00000000000036312a05df8a75d2-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 15:51:10 2022 Received: (at 55560) by debbugs.gnu.org; 21 May 2022 19:51:10 +0000 Received: from localhost ([127.0.0.1]:43014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsV82-0003kT-0h for submit@debbugs.gnu.org; Sat, 21 May 2022 15:51:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsV7x-0003jL-0b for 55560@debbugs.gnu.org; Sat, 21 May 2022 15:51:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsV7r-0000nf-Hz; Sat, 21 May 2022 15:50:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tHca7COpj785cZ/HJPRrE45XKN/qLUKlv/x7f4nRw6c=; b=fgZLeeoMq2T6 bmRr7JpwLuCJK5Ng7gYobfOAsKrqQRH8fvVHpbCT9hNy6N1VjS+gBMPtxj7LrroUatUTqarAMKj58 Ve5PsWlkr8DCBvmpcJe50scT1t/dnc4BQmBDLZXWK2MB2msk4eySUS+N/k7kIAB8nR2rn+q0uPTKK AJ05woTKOkJyQ2/BvkUYsLKZaa6G20nNC6zD5rQHC78+h60GXrJBZUM1/RsP3DZsgbwHjuhKSvqPk QyRiKdViIcv3bSBEt00iLKcMBSMxy4ku7eGkZzEiyyt+EyK9MmedW/1C74CmypDcE+4aJlkaEe3xU g5u6Ua6eKZi5zWQ8iCxLlw==; Received: from [87.69.77.57] (port=2917 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsV7r-0005zs-0k; Sat, 21 May 2022 15:50:59 -0400 Date: Sat, 21 May 2022 22:50:40 +0300 Message-Id: <837d6e8y27.fsf@gnu.org> From: Eli Zaretskii To: Peter Ludemann In-Reply-To: (message from Peter Ludemann on Sat, 21 May 2022 12:16:50 -0700) Subject: Re: bug#55560: 29.0.50; kill-emacs on daemon doesn't remove ~/.emacs.d/.emacs.desktop.lock References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55560 Cc: 55560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Peter Ludemann > Date: Sat, 21 May 2022 12:16:50 -0700 > > I started emacs with "emacs --daemon". I stopped it with the > "kill-emacs" command. Emacs stopped, but the desktop lock file > remained. Following is the my console (not showing the > "emacs --daemon" command). > > I'm pretty sure that older emacsen deleted the lock file > when the daemon was stopped, so this looks like a > regression. If it makes a difference, there was an > existing .emacs.desktop file when I started the daemon. This was a deliberate change in Emacs 28.1: the function that deletes the desktop lock file is now on kill-emacs-query-functions, and that hook is not called from kill-emacs (because kill-emacs isn't supposed to prompt the user, and desktop-kill sometimes need to prompt). Why are you stopping Emacs will kill-emacs? The right way of doing that is to invoke save-buffers-kill-emacs instead, which _will_ delete the desktop lock file. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 16:44:31 2022 Received: (at 55560) by debbugs.gnu.org; 21 May 2022 20:44:31 +0000 Received: from localhost ([127.0.0.1]:43052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsVxf-00057W-1Y for submit@debbugs.gnu.org; Sat, 21 May 2022 16:44:31 -0400 Received: from mail-pg1-f171.google.com ([209.85.215.171]:46999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsVxZ-00057G-Dc for 55560@debbugs.gnu.org; Sat, 21 May 2022 16:44:29 -0400 Received: by mail-pg1-f171.google.com with SMTP id j21so10275769pga.13 for <55560@debbugs.gnu.org>; Sat, 21 May 2022 13:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5/zmM2hR+d86tXKNHgMPMOIjfnCgSlvAtOscn68d88w=; b=GwYJj4vo1V0D/0KjvcHwj4mZTRVEMMoWe/fpoE/+7kQXbZITYQ7OEGwf6cJoW5dqLc KfCHgX3FM/jqfIHvlcOfp+vQF4pBEVElUJvBMD1g1Zv0xl1ZJx5YjdLv9OjTVW0L2wQw 0dIcSd2POuhyfHgjtdJ8QneSLx626rwhv3OLYMjHwTCBnMJ//9Ztkopt7+xLi4mg631v 287KGTM9fZ9fRBeh/P9I1hq1UEZpw4ngvHnedrSxDvxVUot/96J+FQ680L58WOmm7Efe 86X2qn+Gzvg1vJ12n8DGMg7zvDhYkjRJh1CMgya/skZFHmrcC65NL0KnvQgUMlCA1q6s LKug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5/zmM2hR+d86tXKNHgMPMOIjfnCgSlvAtOscn68d88w=; b=E/HTKL6aU4YQxqLknlT9lv/Xk/B80+DATD6gIOXwqGZJjPkkoMXKMiTixPvg5g2CAb H8LLNHyenIt+1cvCknNNL1GRZ8ttdQcxiBskzAdptmjhhpiZJYPXGjlogWYHiW2DtihG EFeDyfmkMtAzuix4h8nHXqFktmbLrDx211dUNdtpb2cCsk7nNkNgS1CcJZEyw99DpsYI V/jXKK/1flFagwkuAqT8ktHHV+YDZGu0csOZMO3HNrdNu783kZpBqpoUTT7JTBipHL24 SnVUlavocnFvSeCT7ic+mw5QSWvXibhop3ps0Q3SboDQLklKg5F3GaVDs/tnoCJWtyZi 1KRA== X-Gm-Message-State: AOAM532iFBV2I3w0QqoPP6t5mZh2HNWx0Yt8eyyVGvSLzJFtYTvwDvos OqZwuwHKrQVJGRrfAgYPV/Q1TJpZKvhZPVNw5p/DzTssmEg= X-Google-Smtp-Source: ABdhPJxQXutN0vLaRjYzBpGK5yWYr2FE9H7+luL4u4TnurNYmkkC5Poee91eYRs+5U+ggytzQ0gzVwMXq/4NtsptI+k= X-Received: by 2002:a63:1953:0:b0:3c6:e5e:9190 with SMTP id 19-20020a631953000000b003c60e5e9190mr13786618pgz.286.1653165859256; Sat, 21 May 2022 13:44:19 -0700 (PDT) MIME-Version: 1.0 References: <837d6e8y27.fsf@gnu.org> In-Reply-To: <837d6e8y27.fsf@gnu.org> From: Peter Ludemann Date: Sat, 21 May 2022 13:43:42 -0700 Message-ID: Subject: Re: bug#55560: 29.0.50; kill-emacs on daemon doesn't remove ~/.emacs.d/.emacs.desktop.lock To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000cbbece05df8babf0" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55560 Cc: 55560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000cbbece05df8babf0 Content-Type: text/plain; charset="UTF-8" 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? --000000000000cbbece05df8babf0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The various wikis are somewhat out of date. Fo= r example, this shows how to create custom functions that do what save-buff= ers-kill-emacs does:=C2=A0https://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", &q= uot;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-emac= s-query-functions
=C2=A0 =C2=A0 =C2=A0(cons (lambda () (yes-or-no-p &quo= t;Really kill Emacs? "))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0k= ill-emacs-query-functions))

which sets kill-emacs-query-functions = to:
((lambda nil
=C2=A0 =C2=A0(yes-or-no-p "Really kill Emacs? &quo= t;))
=C2=A0desktop-kill)

[I don't know where the=C2=A0"= ;desktop-kill" comes from]

I often accidentally do ^X-^C when I r= un emacs in non-daemon mode,=C2=A0so I'd like to keep this hook, or som= ething similar. Is there a better way of getting an "are you sure"= ; message that works with both daemon and non-daemon?

--000000000000cbbece05df8babf0-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 01:23:09 2022 Received: (at 55560) by debbugs.gnu.org; 22 May 2022 05:23:09 +0000 Received: from localhost ([127.0.0.1]:43466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nse3Y-0003b6-JN for submit@debbugs.gnu.org; Sun, 22 May 2022 01:23:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nse3U-0003aL-6N for 55560@debbugs.gnu.org; Sun, 22 May 2022 01:23:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nse3O-0002uL-Sp; Sun, 22 May 2022 01:22:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0u9KGNBpSRNMtqaxULj1DnArNceoPGgWBkerE5w8M6U=; b=Z+N+5CXELFfA MQzDi1Z0B9vjpzfF7Ts7y43XB/NWBOOjE/fDvnxjT6UJTB6uhh6BgBtIb0Jmr8O4zTTXlogH4XiZa hBhIQmcNufaoMtmZ7Q5ZH3gLwHTpXoK8OAWeScl/X3HRA6Nb6P0dCGsqgg43EOHLQyaJuf6bKvkV8 5WI+hbObiCRY473naSJ/86zpGw0BuNoMzi9udWL4SZdErr/Oxy7XthtIfiPkYhhaNfdb15oB4o1fX 9b3wEKPjAlulkisSQyROB58QWak0WY1oFVxJJ2wRnucTPKLIuZgxNAlpUvl4MAwycMfL2IRZ8CKj/ 7oSeDUrSMCLclh5NR/xswg==; Received: from [87.69.77.57] (port=1969 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nse3O-0006Kd-5l; Sun, 22 May 2022 01:22:58 -0400 Date: Sun, 22 May 2022 08:22:41 +0300 Message-Id: <834k1i87ku.fsf@gnu.org> From: Eli Zaretskii To: Peter Ludemann In-Reply-To: (message from Peter Ludemann on Sat, 21 May 2022 13:43:42 -0700) Subject: Re: bug#55560: 29.0.50; kill-emacs on daemon doesn't remove ~/.emacs.d/.emacs.desktop.lock References: <837d6e8y27.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55560 Cc: 55560@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Peter Ludemann > Date: Sat, 21 May 2022 13:43:42 -0700 > Cc: 55560@debbugs.gnu.org > > 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 Feel free to update that. We don't maintain the Wiki, so it is quite likely to be outdated. > Also, the documentation for kill-buffers and save-buffers-kill-emacs makes no mention of the lock file. It isn't useful to mention there any functions that some package adds to the corresponding hooks: there are too many of them, and most aren't relevant for any particular user. Also, where we delete the lock file is an internal implementation detail, so I'm not sure it will be useful to mention it anywhere. If you or someone else wants to see how this stuff works, I recommend reading the source code. That's what I did when I investigated your report. > 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] desktop.el adds desktop-kill to kill-emacs-query-functions. > 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? You can test for the daemon session using the function 'daemonp', and make your "are you sure" question behave accordingly. In general, when a daemon session is killed, there should be no interactive questions -- supporting this case was one of the main reasons why we moved the deletion of the lock file from kill-emacs-hook to kill-emacs-query-functions in the first place. From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 07:25:40 2022 Received: (at control) by debbugs.gnu.org; 22 May 2022 11:25:40 +0000 Received: from localhost ([127.0.0.1]:43783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsjiO-0007En-Gc for submit@debbugs.gnu.org; Sun, 22 May 2022 07:25:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsjiM-0007EW-6B for control@debbugs.gnu.org; Sun, 22 May 2022 07:25:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pYGl7yzE8jfDlivgb7uHwgs9LUHyPFdaqIWJCHf8g/g=; b=JTyjg9/Qb076RI7hEsEujb0cpo NtlsIwpkpLvIv2B4/fatIzOdD41TjKy7s7leBGCkwIR3J9DbvB0hOl/CDvAwF05Xkok75Si1zGc+v /6Mz5OVMehw3y4Q6sj8tGXZYFxjrAH2iknsYlkvgX0LVBCOscM6slBfr3EWJssylJNjQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsjiE-0005bl-It for control@debbugs.gnu.org; Sun, 22 May 2022 13:25:32 +0200 Date: Sun, 22 May 2022 13:25:30 +0200 Message-Id: <87zgj9vmfp.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55560 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 55560 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 55560 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 12:57:05 2022 Received: (at control) by debbugs.gnu.org; 22 May 2022 16:57:05 +0000 Received: from localhost ([127.0.0.1]:46237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsot6-0007yj-RW for submit@debbugs.gnu.org; Sun, 22 May 2022 12:57:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsot4-0007xw-Nd for control@debbugs.gnu.org; Sun, 22 May 2022 12:57:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JziN3ArNenXZ3Cs3EaD1hXpVud1aN7iUKFz4UZETe0U=; b=sfHyhxaGe8cM7hMjJbqqJBxzRk 3bzvx+QbgI5qbAR2B59VykPoEIy+rr/1XwXcv7VobuejnOMEqGgFhXrCl69hFi2TW71/MAPxajgXj mi5CZ9SeIunHn/xjQY5t1aaKPmQ2okizclU9WdOiH5lnw1z9tSAAYGaoKuousKCrEaJ4=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsosw-000094-TO for control@debbugs.gnu.org; Sun, 22 May 2022 18:56:56 +0200 Date: Sun, 22 May 2022 18:56:54 +0200 Message-Id: <8735h1tsix.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55574 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: forcemerge 55574 55560 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) forcemerge 55574 55560 quit From unknown Sat Sep 13 10:22:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 21 Jun 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator