From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#56800: Pointless "Warning: desktop file appears to be in use by PID ###." Date: Wed, 27 Jul 2022 19:52:31 +0200 Message-ID: References: <838roebivp.fsf@gnu.org> <834jz2bgvr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006ac69a05e4cd15ec" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12219"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56800@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 27 19:57:49 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGlI4-00034e-Qm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Jul 2022 19:57:48 +0200 Original-Received: from localhost ([::1]:34616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGlI3-0000XB-Ny for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Jul 2022 13:57:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGlDT-0004MD-0T for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2022 13:53:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGlDS-0002II-OJ for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2022 13:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGlDS-0003iE-EC for bug-gnu-emacs@gnu.org; Wed, 27 Jul 2022 13:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jul 2022 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56800 X-GNU-PR-Package: emacs Original-Received: via spool by 56800-submit@debbugs.gnu.org id=B56800.165894437314253 (code B ref 56800); Wed, 27 Jul 2022 17:53:02 +0000 Original-Received: (at 56800) by debbugs.gnu.org; 27 Jul 2022 17:52:53 +0000 Original-Received: from localhost ([127.0.0.1]:56938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGlDI-0003hp-W7 for submit@debbugs.gnu.org; Wed, 27 Jul 2022 13:52:53 -0400 Original-Received: from mail-yw1-f169.google.com ([209.85.128.169]:46732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGlDE-0003hN-6b for 56800@debbugs.gnu.org; Wed, 27 Jul 2022 13:52:50 -0400 Original-Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-31f445bd486so64848967b3.13 for <56800@debbugs.gnu.org>; Wed, 27 Jul 2022 10:52:48 -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=m/yhawwLdUAn+gyODIxks72vjsPunvKWqmatBTz+UX8=; b=C9NPxE84z8t+zTZsENbXAvxxiYoK7+wYc3KJ/qJKRPiJzURw0OlLrxZyjA/nn7UIv0 NxfTnFSiZT956WpOvBhtXqEzYw0ofP3cyFULDvEUIz9Joo9NVSMKWvfKSN4n7U6b0w93 +m3Vmf7hyK5zA0ILcHtr2Le9chhgdRIzLy7CGZ1R7343u0N1BhUoVYJoI/Ib0Ua/OWal EXb9sJQP+h4siirOKPYkjrjZLFfmlc81HaNbJZ7VzClzyez2P0PPrFeL0C7773isprHZ pmQ1+ILz6bWXDHvRvG9/t7WACt/694cIEtxBoH7c5rtvxHpyiTCtCJqLaEd4qJhYCPck pDjw== 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=m/yhawwLdUAn+gyODIxks72vjsPunvKWqmatBTz+UX8=; b=lB0DJoPofwhLPdTBMP/9Uus8wfJzvU7M8k7QwozO6O69lxDfgmpAFCSwpnOvTV3zuc fctceI3L8AKocqxyu+eeec9tHJx++ckNgtmzWwCwA8EsUARweqzbxDNJbhUgFPwcSKAH IeSbpgqnF3YRXJdVHTXTIfryQt8/QJiMoAJbgERZFOmP+qO29xkVWuri6PBZcCyWQRes Fuq/t3PjLXZICnGDHV4oq8283ZxFJb7tqqsP4DBh/81DkEo+oeVFtqOvoNHOd8KsEOzv qk8DG/e+VMyHrwh8DZkH6JgplrTXCDBCA53ta1kBsX3vXiWb54GJLH8D4lFoSnmL/F+L 7PcA== X-Gm-Message-State: AJIora9MIk6Hh85/7ipIEkMyXjy58189xx/giJmp5U+MaR+nn5C25dsa 4VEfsC2ZfCugaACw9xzr1EzV8ogdPn0rg5+qzimr1Xz12g== X-Google-Smtp-Source: AGRyM1uDPZv/4WG1U+43NYRPP52+iPMSfGXpGFKTkZYiR4d59amfyTSPbfuz4EURII2pz1g1fnF50z6XcJPEHxzniYM= X-Received: by 2002:a0d:fe46:0:b0:31e:56c0:d051 with SMTP id o67-20020a0dfe46000000b0031e56c0d051mr20778386ywf.371.1658944362298; Wed, 27 Jul 2022 10:52:42 -0700 (PDT) In-Reply-To: <834jz2bgvr.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238054 Archived-At: --0000000000006ac69a05e4cd15ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yeah, apparently `kill-emacs' is considered "low-level primitive": Functions to call with no arguments to query about killing Emacs. If any of these functions returns nil, killing Emacs is canceled. =E2=80=98save-buffers-kill-emacs=E2=80=99 calls these functions, but = =E2=80=98kill-emacs=E2=80=99, the low level primitive, does not. See also =E2=80=98kill-emacs-hook= =E2=80=99. Since I have rebound C-x C-c for my private use (why waste such a nice shortcut on something used once in a few days?), I have been using `kill-emacs'. But apparently it's not what should be used... Emacs making it easy to silently break things, nothing new. I suggest that `desktop-release-lock' call is still moved from something hooked on `kill-emacs-query-functions' to `kill-emacs-hook'. That part is supposed to be done unconditionally. Paul On Wed, 27 Jul 2022 at 19:32, Eli Zaretskii wrote: > > From: Paul Pogonyshev > > Date: Wed, 27 Jul 2022 18:58:36 +0200 > > Cc: 56800@debbugs.gnu.org > > > > But why does even cleanly exiting Emacs leave desktop file "apparently > used"? > > It shouldn't, and it doesn't here. Something I hope you will look > into and tell what you found. > --0000000000006ac69a05e4cd15ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yeah, apparently `kill-emacs' is considered "low-= level primitive":

=C2=A0 =C2=A0 Functions to call w= ith no arguments to query about killing Emacs.
=C2=A0 =C2=A0=C2=A0If any= of these functions returns nil, killing Emacs is canceled.
=C2=A0 =C2= =A0=C2=A0=E2=80=98save-buffers-kill-emacs=E2=80=99 calls these functions, b= ut =E2=80=98kill-emacs=E2=80=99,
=C2=A0 =C2=A0=C2=A0the low level primit= ive, does not.=C2=A0 See also =E2=80=98kill-emacs-hook=E2=80=99.
<= div>
Since I have rebound C-x C-c for my private use (why was= te such a nice shortcut on something used once in a few days?), I have been= using `kill-emacs'. But apparently it's not what should be used...= Emacs making it easy to silently break things, nothing new.

=
I suggest that `desktop-release-lock' call is still moved fr= om something hooked on `kill-emacs-query-functions' to `kill-emacs-hook= '. That part is supposed to be done unconditionally.

Paul

On Wed, 27 Jul 2022 at 19:32, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Paul Pogonyshev <pogonyshev@gmail.com>= ;
> Date: Wed, 27 Jul 2022 18:58:36 +0200
> Cc: 56800@d= ebbugs.gnu.org
>
> But why does even cleanly exiting Emacs leave desktop file "appar= ently used"?

It shouldn't, and it doesn't here.=C2=A0 Something I hope you will = look
into and tell what you found.
--0000000000006ac69a05e4cd15ec--