GNU bug report logs -
#56800
Pointless "Warning: desktop file appears to be in use by PID ###."
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56800 in the body.
You can then email your comments to 56800 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 16:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Pogonyshev <pogonyshev <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 27 Jul 2022 16:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.33,
cairo version 1.16.0) of 2022-07-26
Practically every time I start up Emacs, I get this pointless warning and a
question if I really want to use the desktop file anyway. If there were
actually another Emacs running, this warning would be fine, even useful.
However, in 95% of cases here it happens because computer was shut down,
Emacs crashed etc. In fact, I have just now verified that even if I cleanly
`M-x kill-emacs RET' my Emacs and then start a new one, the new still
thinks that the old, killed Emacs might still be using the desktop file
somehow (i.e. PID is that of the previous Emacs process).
The code in `desktop.el' should really check if the process with that PID
still exists before claiming that it might be using the desktop file
somehow.
Paul
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 16:51:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 56800 <at> debbugs.gnu.org (full text, mbox):
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Wed, 27 Jul 2022 18:25:24 +0200
>
> The code in `desktop.el' should really check if the process with that PID still exists before claiming that it
> might be using the desktop file somehow.
AFAIU, you should be able to have that if you customize
desktop-load-locked-desktop to give it the value 'check-pid'. Did you
try that?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 16:59:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 56800 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
No, but I have tried now. I guess I understand the default behavior better
now (even if I don't find it generally useful enough to be the default; how
many users really have remotely mounted paths in `desktop-dirname'?).
But why does even cleanly exiting Emacs leave desktop file "apparently
used"?
Paul
On Wed, 27 Jul 2022 at 18:50, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> > Date: Wed, 27 Jul 2022 18:25:24 +0200
> >
> > The code in `desktop.el' should really check if the process with that
> PID still exists before claiming that it
> > might be using the desktop file somehow.
>
> AFAIU, you should be able to have that if you customize
> desktop-load-locked-desktop to give it the value 'check-pid'. Did you
> try that?
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 17:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 56800 <at> debbugs.gnu.org (full text, mbox):
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Wed, 27 Jul 2022 18:58:36 +0200
> Cc: 56800 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 17:53:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 56800 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
‘save-buffers-kill-emacs’ calls these functions, but ‘kill-emacs’,
the low level primitive, does not. See also ‘kill-emacs-hook’.
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 <eliz <at> gnu.org> wrote:
> > From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> > Date: Wed, 27 Jul 2022 18:58:36 +0200
> > Cc: 56800 <at> 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.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 18:59:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 56800 <at> debbugs.gnu.org (full text, mbox):
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Wed, 27 Jul 2022 19:52:31 +0200
> Cc: 56800 <at> debbugs.gnu.org
>
> 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.
> ‘save-buffers-kill-emacs’ calls these functions, but ‘kill-emacs’,
> the low level primitive, does not. See also ‘kill-emacs-hook’.
>
> 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.
That change was made because the hook can ask questions, which doesn't
work in a daemon session. So we moved the hook.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56800
; Package
emacs
.
(Wed, 27 Jul 2022 19:24:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 56800 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I meant something like what is in the attached patch. The problem is that
_everything_ got moved to `...-query-functions', including that part that
has nothing to do with querying.
Paul
On Wed, 27 Jul 2022 at 20:58, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> > Date: Wed, 27 Jul 2022 19:52:31 +0200
> > Cc: 56800 <at> debbugs.gnu.org
> >
> > 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.
> > ‘save-buffers-kill-emacs’ calls these functions, but ‘kill-emacs’,
> > the low level primitive, does not. See also ‘kill-emacs-hook’.
> >
> > 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.
>
> That change was made because the hook can ask questions, which doesn't
> work in a daemon session. So we moved the hook.
>
[Message part 2 (text/html, inline)]
[0001-Followup-to-5bd04ea307-still-have-M-x-kill-emacs-rel.patch (text/x-patch, attachment)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 28 Jul 2022 06:18:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Paul Pogonyshev <pogonyshev <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 28 Jul 2022 06:18:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 56800-done <at> debbugs.gnu.org (full text, mbox):
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Wed, 27 Jul 2022 21:22:46 +0200
> Cc: 56800 <at> debbugs.gnu.org
>
> I meant something like what is in the attached patch. The problem is that _everything_ got moved to
> `...-query-functions', including that part that has nothing to do with querying.
Thanks, installed on the emacs-28 release branch.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 25 Aug 2022 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.